mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-06 13:14:27 +00:00
83d290c56f
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
100 lines
2.7 KiB
C
100 lines
2.7 KiB
C
// SPDX-License-Identifier: GPL-2.0+
|
|
/*
|
|
* (C) Copyright 2000
|
|
* Rob Taylor, Flying Pig Systems. robt@flyingpig.com.
|
|
*/
|
|
|
|
#include <config.h>
|
|
|
|
#include <ns87308.h>
|
|
|
|
void initialise_ns87308 (void)
|
|
{
|
|
#ifdef CONFIG_SYS_NS87308_PS2MOD
|
|
unsigned char data;
|
|
|
|
/*
|
|
* Switch floppy drive to PS/2 mode.
|
|
*/
|
|
read_pnp_config(SUPOERIO_CONF1, &data);
|
|
data &= 0xFB;
|
|
write_pnp_config(SUPOERIO_CONF1, data);
|
|
#endif
|
|
|
|
#if (CONFIG_SYS_NS87308_DEVS & CONFIG_SYS_NS87308_KBC1)
|
|
PNP_SET_DEVICE_BASE(LDEV_KBC1, CONFIG_SYS_NS87308_KBC1_BASE);
|
|
write_pnp_config(LUN_CONFIG_REG, 0);
|
|
write_pnp_config(CBASE_HIGH, 0x00);
|
|
write_pnp_config(CBASE_LOW, 0x64);
|
|
#endif
|
|
|
|
#if (CONFIG_SYS_NS87308_DEVS & CONFIG_SYS_NS87308_MOUSE)
|
|
PNP_ACTIVATE_DEVICE(LDEV_MOUSE);
|
|
#endif
|
|
|
|
#if (CONFIG_SYS_NS87308_DEVS & CONFIG_SYS_NS87308_RTC_APC)
|
|
PNP_SET_DEVICE_BASE(LDEV_RTC_APC, CONFIG_SYS_NS87308_RTC_BASE);
|
|
#endif
|
|
|
|
#if (CONFIG_SYS_NS87308_DEVS & CONFIG_SYS_NS87308_FDC)
|
|
PNP_SET_DEVICE_BASE(LDEV_FDC, CONFIG_SYS_NS87308_FDC_BASE);
|
|
write_pnp_config(LUN_CONFIG_REG, 0x40);
|
|
#endif
|
|
|
|
#if (CONFIG_SYS_NS87308_DEVS & CONFIG_SYS_NS87308_RARP)
|
|
PNP_SET_DEVICE_BASE(LDEV_PARP, CONFIG_SYS_NS87308_LPT_BASE);
|
|
#endif
|
|
|
|
#if (CONFIG_SYS_NS87308_DEVS & CONFIG_SYS_NS87308_UART1)
|
|
PNP_SET_DEVICE_BASE(LDEV_UART1, CONFIG_SYS_NS87308_UART1_BASE);
|
|
#endif
|
|
|
|
#if (CONFIG_SYS_NS87308_DEVS & CONFIG_SYS_NS87308_UART2)
|
|
PNP_SET_DEVICE_BASE(LDEV_UART2, CONFIG_SYS_NS87308_UART2_BASE);
|
|
#endif
|
|
|
|
#if (CONFIG_SYS_NS87308_DEVS & CONFIG_SYS_NS87308_GPIO)
|
|
PNP_SET_DEVICE_BASE(LDEV_GPIO, CONFIG_SYS_NS87308_GPIO_BASE);
|
|
#endif
|
|
|
|
#if (CONFIG_SYS_NS87308_DEVS & CONFIG_SYS_NS87308_POWRMAN)
|
|
#ifndef CONFIG_SYS_NS87308_PWMAN_BASE
|
|
PNP_ACTIVATE_DEVICE(LDEV_POWRMAN);
|
|
#else
|
|
PNP_SET_DEVICE_BASE(LDEV_POWRMAN, CONFIG_SYS_NS87308_PWMAN_BASE);
|
|
|
|
/*
|
|
* Enable all units
|
|
*/
|
|
write_pm_reg(CONFIG_SYS_NS87308_PWMAN_BASE, PWM_FER1, 0x7d);
|
|
write_pm_reg(CONFIG_SYS_NS87308_PWMAN_BASE, PWM_FER2, 0x87);
|
|
|
|
#ifdef CONFIG_SYS_NS87308_PMC1
|
|
write_pm_reg(CONFIG_SYS_NS87308_PWMAN_BASE, PWM_PMC1, CONFIG_SYS_NS87308_PMC1);
|
|
#endif
|
|
|
|
#ifdef CONFIG_SYS_NS87308_PMC2
|
|
write_pm_reg(CONFIG_SYS_NS87308_PWMAN_BASE, PWM_PMC2, CONFIG_SYS_NS87308_PMC2);
|
|
#endif
|
|
|
|
#ifdef CONFIG_SYS_NS87308_PMC3
|
|
write_pm_reg(CONFIG_SYS_NS87308_PWMAN_BASE, PWM_PMC3, CONFIG_SYS_NS87308_PMC3);
|
|
#endif
|
|
#endif
|
|
#endif
|
|
|
|
#ifdef CONFIG_SYS_NS87308_CS0_BASE
|
|
PNP_PGCS_CSLINE_BASE(0, CONFIG_SYS_NS87308_CS0_BASE);
|
|
PNP_PGCS_CSLINE_CONF(0, CONFIG_SYS_NS87308_CS0_CONF);
|
|
#endif
|
|
|
|
#ifdef CONFIG_SYS_NS87308_CS1_BASE
|
|
PNP_PGCS_CSLINE_BASE(1, CONFIG_SYS_NS87308_CS1_BASE);
|
|
PNP_PGCS_CSLINE_CONF(1, CONFIG_SYS_NS87308_CS1_CONF);
|
|
#endif
|
|
|
|
#ifdef CONFIG_SYS_NS87308_CS2_BASE
|
|
PNP_PGCS_CSLINE_BASE(2, CONFIG_SYS_NS87308_CS2_BASE);
|
|
PNP_PGCS_CSLINE_CONF(2, CONFIG_SYS_NS87308_CS2_CONF);
|
|
#endif
|
|
}
|