DB1300 support
Subsystems (5)
cover DB1300 support
Here are 2 patches against current mips-queue which add Au1300 and Db1300 devboard support. It's a work-in-progress, and has one serious flaw: I can't get the serial console to work reliably once kernel starts booting userpsace. Enabling debugging shows the enabling the proper irq, however hardly any interrupts arrive unless massive amounts of debug info (by way of the irq dispatcher) is dumped out to it. Once userspace has booted, and most debig output has been hidden (echo 0 0 0 0 > /proc/sys/kernel/printk) it continues to work as it should for a few bytes, then it dies. Judging from the debug logs it seems the UART generates far less interrupts than for example the au1200 ones.
Until its figured out what's going on, please take the opportunity to have a look at the code and suggest better ways to implement things and bugs.
Thanks!
Manuel Lauss (2):
MIPS: Alchemy: Au1300 SoC support
Alchemy: DB1300 support WIP WIP WIP
arch/mips/Makefile | 7 + arch/mips/alchemy/Kconfig | 31 +- arch/mips/alchemy/common/Makefile | 9 +- arch/mips/alchemy/common/dbdma.c | 48 +- arch/mips/alchemy/common/gpioint.c | 374 +++++++ arch/mips/alchemy/common/gpiolib-au1300.c | 54 + arch/mips/alchemy/common/platform.c | 9 + arch/mips/alchemy/common/power.c | 18 +- arch/mips/alchemy/common/time.c | 1 + arch/mips/alchemy/devboards/Makefile | 1 + arch/mips/alchemy/devboards/db1300/Makefile | 2 + arch/mips/alchemy/devboards/db1300/platform.c | 234 +++++ arch/mips/alchemy/devboards/db1300/setup.c | 158 +++ arch/mips/alchemy/devboards/prom.c | 4 + arch/mips/configs/db1300_defconfig | 1160 ++++++++++++++++++++++ arch/mips/include/asm/cpu.h | 8 + arch/mips/include/asm/mach-au1x00/au1000.h | 189 ++++ arch/mips/include/asm/mach-au1x00/au1xxx_dbdma.h | 33 + arch/mips/include/asm/mach-au1x00/gpio-au1300.h | 211 ++++ arch/mips/include/asm/mach-au1x00/gpio.h | 4 + arch/mips/include/asm/mach-db1x00/bcsr.h | 3 + arch/mips/include/asm/mach-db1x00/db1300.h | 37 + arch/mips/kernel/cpu-probe.c | 18 + drivers/i2c/busses/Kconfig | 2 +- drivers/pcmcia/db1xxx_ss.c | 14 +- drivers/spi/Kconfig | 2 +- drivers/video/Kconfig | 10 +- 27 files changed, 2613 insertions(+), 28 deletions(-) create mode 100644 arch/mips/alchemy/common/gpioint.c create mode 100644 arch/mips/alchemy/common/gpiolib-au1300.c create mode 100644 arch/mips/alchemy/devboards/db1300/Makefile create mode 100644 arch/mips/alchemy/devboards/db1300/platform.c create mode 100644 arch/mips/alchemy/devboards/db1300/setup.c create mode 100644 arch/mips/configs/db1300_defconfig create mode 100644 arch/mips/include/asm/mach-au1x00/gpio-au1300.h create mode 100644 arch/mips/include/asm/mach-db1x00/db1300.h
RFC PATCH 1/2 MIPS: Alchemy: Au1300 SoC support
Add support for the Au1300 SoC: New GPIO/Interrupt controller code, basic integration.
doesn't work quite right yet: serial console uart doesn't generate enough interrupts.
--- arch/mips/alchemy/Kconfig | 23 +- arch/mips/alchemy/common/Makefile | 9 +- arch/mips/alchemy/common/dbdma.c | 48 +++- arch/mips/alchemy/common/gpioint.c | 374 ++++++++++++++++++++++ arch/mips/alchemy/common/gpiolib-au1300.c | 54 +++ arch/mips/alchemy/common/platform.c | 9 + arch/mips/alchemy/common/power.c | 18 +- arch/mips/alchemy/common/time.c | 1 + arch/mips/include/asm/cpu.h | 8 + arch/mips/include/asm/mach-au1x00/au1000.h | 189 +++++++++++ arch/mips/include/asm/mach-au1x00/au1xxx_dbdma.h | 33 ++ arch/mips/include/asm/mach-au1x00/gpio-au1300.h | 211 ++++++++++++ arch/mips/include/asm/mach-au1x00/gpio.h | 4 + arch/mips/kernel/cpu-probe.c | 18 + drivers/i2c/busses/Kconfig | 2 +- drivers/spi/Kconfig | 2 +- drivers/video/Kconfig | 10 +- 17 files changed, 987 insertions(+), 26 deletions(-) create mode 100644 arch/mips/alchemy/common/gpioint.c create mode 100644 arch/mips/alchemy/common/gpiolib-au1300.c create mode 100644 arch/mips/include/asm/mach-au1x00/gpio-au1300.h
arch/mips/alchemy/Kconfig +16 -7
@@ -1,5 +1,9 @@ -# au1000-style gpio -config ALCHEMY_GPIO_AU1000 +# au1000-style GPIO and interrupt controller +config ALCHEMY_GPIOINT_AU1000 + bool + +# au1300-style GPIO/INT controller +config ALCHEMY_GPIOINT_AU1300 bool # select this in your board config if you don't want to use the gpio
@@ -133,27 +137,32 @@ endchoice config SOC_AU1000 bool select SOC_AU1X00 - select ALCHEMY_GPIO_AU1000 + select ALCHEMY_GPIOINT_AU1000 config SOC_AU1100 bool select SOC_AU1X00 - select ALCHEMY_GPIO_AU1000 + select ALCHEMY_GPIOINT_AU1000 config SOC_AU1500 bool select SOC_AU1X00 - select ALCHEMY_GPIO_AU1000 + select ALCHEMY_GPIOINT_AU1000 config SOC_AU1550 bool select SOC_AU1X00 - select ALCHEMY_GPIO_AU1000 + select ALCHEMY_GPIOINT_AU1000 config SOC_AU1200 bool select SOC_AU1X00 - select ALCHEMY_GPIO_AU1000 + select ALCHEMY_GPIOINT_AU1000 + +config SOC_AU1300 + bool + select SOC_AU1X00 + select ALCHEMY_GPIOINT_AU1300 config SOC_AU1X00 bool
arch/mips/alchemy/common/Makefile +6 -3
@@ -5,14 +5,17 @@ # Makefile for the Alchemy Au1xx0 CPUs, generic files. # -obj-y += prom.o irq.o time.o reset.o \ - clocks.o platform.o power.o setup.o \ +obj-y += prom.o time.o reset.o clocks.o platform.o power.o setup.o \ sleeper.o dma.o dbdma.o +obj-$(CONFIG_ALCHEMY_GPIOINT_AU1000) += irq.o +obj-$(CONFIG_ALCHEMY_GPIOINT_AU1300) += gpioint.o + # optional gpiolib support ifeq ($(CONFIG_ALCHEMY_GPIO_INDIRECT),) ifeq ($(CONFIG_GPIOLIB),y) - obj-$(CONFIG_ALCHEMY_GPIO_AU1000) += gpiolib-au1000.o + obj-$(CONFIG_ALCHEMY_GPIOINT_AU1000) += gpiolib-au1000.o + obj-$(CONFIG_ALCHEMY_GPIOINT_AU1300) += gpiolib-au1300.o endif endif
arch/mips/alchemy/common/dbdma.c +44 -4
69 lines not on this page · raw message
arch/mips/alchemy/common/gpioint.c new file +374 -0
374 lines not on this page · raw message
arch/mips/alchemy/common/gpiolib-au1300.c new file +54 -0
54 lines not on this page · raw message
arch/mips/alchemy/common/platform.c +9 -0
@@ -69,6 +69,11 @@ static struct plat_serial8250_port au1x00_uart_data[] = { #elif defined(CONFIG_SOC_AU1200) PORT(UART0_PHYS_ADDR, AU1200_UART0_INT), PORT(UART1_PHYS_ADDR, AU1200_UART1_INT), +#elif defined(CONFIG_SOC_AU1300) + PORT(AU1300_UART0_PHYS_ADDR, AU1300_UART0_INT), + PORT(AU1300_UART1_PHYS_ADDR, AU1300_UART1_INT), + PORT(AU1300_UART2_PHYS_ADDR, AU1300_UART2_INT), + PORT(AU1300_UART3_PHYS_ADDR, AU1300_UART3_INT), #endif #endif /* CONFIG_SERIAL_8250_AU1X00 */ { },
@@ -82,6 +87,7 @@ static struct platform_device au1xx0_uart_device = { }, }; +#ifdef FOR_PLATFORM_C_USB_HOST_INT /* OHCI (USB full speed host controller) */ static struct resource au1xxx_usb_ohci_resources[] = { [0] = {
@@ -109,6 +115,7 @@ static struct platform_device au1xxx_usb_ohci_device = { .num_resources = ARRAY_SIZE(au1xxx_usb_ohci_resources), .resource = au1xxx_usb_ohci_resources, }; +#endif /*** AU1100 LCD controller ***/
@@ -345,7 +352,9 @@ static struct platform_device pbdb_smbus_device = {static struct platform_device *au1xxx_platform_devices[]__initdata = { &au1xx0_uart_device, +#ifdef FOR_PLATFORM_C_USB_HOST_INT &au1xxx_usb_ohci_device, +#endif #ifdef CONFIG_FB_AU1100 &au1100_lcd_device, #endif
arch/mips/alchemy/common/power.c +13 -5
@@ -36,7 +36,8 @@#include <asm/uaccess.h> #include <asm/mach-au1x00/au1000.h> -#if defined(CONFIG_SOC_AU1550 ) || defined(CONFIG_SOC_AU1200 ) +#if defined(CONFIG_SOC_AU1550 ) || defined(CONFIG_SOC_AU1200 ) || \ + defined(CONFIG_SOC_AU1300 )#include <asm/mach-au1x00/au1xxx_dbdma.h> #endif
@@ -52,7 +53,9 @@* We only have to save/restore registers that aren't otherwise * done as part of a driver pm_* function. */ +#ifndef CONFIG_SOC_AU1300 static unsigned int sleep_usb[2 ]; +#endif static unsigned int sleep_sys_clocks[5 ];static unsigned int sleep_sys_pinfunc;static unsigned int sleep_static_memctlr[4 ][3 ];
@@ -61,7 +64,8 @@ static unsigned int sleep_static_memctlr[4][3];static void save_core_regs (void ) {#ifndef CONFIG_SOC_AU1200 -/* Shutdown USB host/device. */ +#ifndef CONFIG_SOC_AU1300 +/* Shutdown USB host/device. */ sleep_usb[0 ] =au_readl (USB_HOST_CONFIG );/* There appears to be some undocumented reset register.... */
@@ -73,7 +77,7 @@ static void save_core_regs(void) sleep_usb[1 ] =au_readl (USBD_ENABLE );au_writel (0 ,USBD_ENABLE );au_sync (); - +#endif /* au1300 */ #else /* AU1200 */ /* enable access to OTG mmio so we can save OTG CAP/MUX.
@@ -112,7 +116,8 @@ static void save_core_regs(void) sleep_static_memctlr[3 ][1 ] =au_readl (MEM_STTIME3 ); sleep_static_memctlr[3 ][2 ] =au_readl (MEM_STADDR3 ); -#if defined(CONFIG_SOC_AU1550 ) || defined(CONFIG_SOC_AU1200 ) +#if defined(CONFIG_SOC_AU1550 ) || defined(CONFIG_SOC_AU1200 ) || \ + defined(CONFIG_SOC_AU1300 )au1xxx_dbdma_suspend ();#endif }
@@ -136,9 +141,11 @@ static void restore_core_regs(void)au_sync ();#ifndef CONFIG_SOC_AU1200 +#ifndef CONFIG_SOC_AU1300 au_writel (sleep_usb[0 ],USB_HOST_CONFIG );au_writel (sleep_usb[1 ],USBD_ENABLE );au_sync (); +#endif #else /* enable accces to OTG memory */ au_writel (au_readl (USB_MSR_BASE +4 ) | (1 <<6 ),USB_MSR_BASE +4 );
@@ -167,7 +174,8 @@ static void restore_core_regs(void)restore_au1xxx_intctl (); -#if defined(CONFIG_SOC_AU1550 ) || defined(CONFIG_SOC_AU1200 ) +#if defined(CONFIG_SOC_AU1550 ) || defined(CONFIG_SOC_AU1200 ) || \ + defined(CONFIG_AOC_AU1300 )au1xxx_dbdma_resume ();#endif }
arch/mips/alchemy/common/time.c +1 -0
@@ -179,6 +179,7 @@ static int alchemy_m2inttab[] __initdata = {AU1100_RTC_MATCH2_INT ,AU1550_RTC_MATCH2_INT ,AU1200_RTC_MATCH2_INT , + AU1300_RTC_MATCH2_INT, };void __init plat_time_init (void )
arch/mips/include/asm/cpu.h +8 -0
@@ -33,6 +33,7 @@#define PRID_COMP_TOSHIBA 0x070000#define PRID_COMP_LSI 0x080000#define PRID_COMP_LEXRA 0x0b0000 +#define PRID_COMP_RMI 0x0c0000#define PRID_COMP_CAVIUM 0x0d0000
@@ -121,6 +122,13 @@#define PRID_REV_BCM6368 0x0030/* +* These are the PRID's for when 23:16 == PRID_COMP_RMI +*/ + +#define PRID_IMP_AU13XX 0x8000 + + +/* * These are the PRID's for when 23:16 == PRID_COMP_CAVIUM */
arch/mips/include/asm/mach-au1x00/au1000.h +189 -0
231 lines not on this page · raw message
arch/mips/include/asm/mach-au1x00/au1xxx_dbdma.h +33 -0
@@ -195,6 +195,39 @@ typedef volatile struct au1xxx_ddma_desc {#define DSCR_CMD0_CIM_SYNC 26#endif /* CONFIG_SOC_AU1200 */ +#ifdef CONFIG_SOC_AU1300 +#define DSCR_CMD0_UART0_TX 0 +#define DSCR_CMD0_UART0_RX 1 +#define DSCR_CMD0_UART1_TX 2 +#define DSCR_CMD0_UART1_RX 3 +#define DSCR_CMD0_UART2_TX 4 +#define DSCR_CMD0_UART2_RX 5 +#define DSCR_CMD0_UART3_TX 6 +#define DSCR_CMD0_UART3_RX 7 +#define DSCR_CMD0_SDMS_TX0 8 +#define DSCR_CMD0_SDMS_RX0 9 +#define DSCR_CMD0_SDMS_TX1 10 +#define DSCR_CMD0_SDMS_RX1 11 +#define DSCR_CMD0_AES_TX 12 +#define DSCR_CMD0_AES_RX 13 +#define DSCR_CMD0_PSC0_TX 14 +#define DSCR_CMD0_PSC0_RX 15 +#define DSCR_CMD0_PSC1_TX 16 +#define DSCR_CMD0_PSC1_RX 17 +#define DSCR_CMD0_PSC2_TX 18 +#define DSCR_CMD0_PSC2_RX 19 +#define DSCR_CMD0_PSC3_TX 20 +#define DSCR_CMD0_PSC3_RX 21 +#define DSCR_CMD0_LCD 22 +#define DSCR_CMD0_NAND_FLASH 23 +#define DSCR_CMD0_SDMS_TX2 24 +#define DSCR_CMD0_SDMS_RX2 25 +#define DSCR_CMD0_CIM_SYNC 26 +#define DSCR_CMD0_UDMA 27 +#define DSCR_CMD0_DMA_REQ0 28 +#define DSCR_CMD0_DMA_REQ1 29 +#endif /* CONFIG_SOC_AU1300 */ +#define DSCR_CMD0_THROTTLE 30#define DSCR_CMD0_ALWAYS 31#define DSCR_NDEV_IDS 32
arch/mips/include/asm/mach-au1x00/gpio-au1300.h new file +211 -0
211 lines not on this page · raw message
arch/mips/include/asm/mach-au1x00/gpio.h +4 -0
@@ -5,6 +5,10 @@#include <asm/mach-au1x00/gpio-au1000.h> +#elif defined(CONFIG_SOC_AU1300 ) + +#include <asm/mach-au1x00/gpio-au1300.h> +#endif #endif /* _ALCHEMY_GPIO_H_ */
arch/mips/kernel/cpu-probe.c +18 -0
@@ -802,6 +802,21 @@ static inline void cpu_probe_alchemy(struct cpuinfo_mips *c, unsigned int cpu) } } +static inline void cpu_probe_rmi (struct cpuinfo_mips *c,int cpu) +{ +decode_configs (c); + +switch (c->processor_id &0xff00 ) { +case PRID_IMP_AU13XX : + c->cputype =CPU_ALCHEMY ; + __cpu_name[cpu] ="Au13xx" ; +break ; +default : +panic ("Unknown RMI core!\n" ); +break ; + } +} +static inline void cpu_probe_sibyte (struct cpuinfo_mips *c,unsigned int cpu) {decode_configs (c);
@@ -936,6 +951,9 @@ __cpuinit void cpu_probe(void)case PRID_COMP_NXP :cpu_probe_nxp (c, cpu);break ; +case PRID_COMP_RMI : +cpu_probe_rmi (c, cpu); +break ;case PRID_COMP_CAVIUM :cpu_probe_cavium (c, cpu);break ;
drivers/i2c/busses/Kconfig +1 -1
@@ -294,7 +294,7 @@ config I2C_AT91 config I2C_AU1550 tristate "Au1550/Au1200 SMBus interface" - depends on SOC_AU1550 || SOC_AU1200 + depends on SOC_AU1550 || SOC_AU1200 || SOC_AU1300 help If you say yes to this option, support will be included for the Au1550 and Au1200 SMBus interface.
drivers/spi/Kconfig +1 -1
@@ -68,7 +68,7 @@ config SPI_BFIN config SPI_AU1550 tristate "Au1550/Au12x0 SPI Controller" - depends on (SOC_AU1550 || SOC_AU1200) && EXPERIMENTAL + depends on (SOC_AU1550 || SOC_AU1200 || SOC_AU1300) && EXPERIMENTAL select SPI_BITBANG help If you say yes to this option, support will be included for the
drivers/video/Kconfig +5 -5
@@ -1662,15 +1662,15 @@ config FB_AU1100 au1100fb:panel=<name>. config FB_AU1200 - bool "Au1200 LCD Driver" - depends on (FB = y) && MIPS && SOC_AU1200 + bool "Au1200/Au1300 LCD Driver" + depends on (FB = y) && (SOC_AU1200 || SOC_AU1300) select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT help - This is the framebuffer driver for the AMD Au1200 SOC. It can drive - various panels and CRTs by passing in kernel cmd line option - au1200fb:panel=<name>. + This is the framebuffer driver for the AMD Au1200/Au1300 SOCs. + It can drive various panels and CRTs by passing in kernel + cmdline option au1200fb:panel=<name>. source "drivers/video/geode/Kconfig"
Signature · 1 line
1.6.5.2
RFC PATCH 2/2 Alchemy: DB1300 support.
VERY basic DB1300 board support, WORK IN PROGRESS
--- arch/mips/Makefile | 7 + arch/mips/alchemy/Kconfig | 8 + arch/mips/alchemy/devboards/Makefile | 1 + arch/mips/alchemy/devboards/db1300/Makefile | 2 + arch/mips/alchemy/devboards/db1300/platform.c | 234 +++++ arch/mips/alchemy/devboards/db1300/setup.c | 158 ++++ arch/mips/alchemy/devboards/prom.c | 4 + arch/mips/configs/db1300_defconfig | 1160 +++++++++++++++++++++++++ arch/mips/include/asm/mach-db1x00/bcsr.h | 3 + arch/mips/include/asm/mach-db1x00/db1300.h | 37 + drivers/pcmcia/db1xxx_ss.c | 14 +- 11 files changed, 1626 insertions(+), 2 deletions(-) create mode 100644 arch/mips/alchemy/devboards/db1300/Makefile create mode 100644 arch/mips/alchemy/devboards/db1300/platform.c create mode 100644 arch/mips/alchemy/devboards/db1300/setup.c create mode 100644 arch/mips/configs/db1300_defconfig create mode 100644 arch/mips/include/asm/mach-db1x00/db1300.h
arch/mips/Makefile +7 -0
@@ -266,6 +266,13 @@ cflags-$(CONFIG_MIPS_DB1200) += -I$(srctree)/arch/mips/include/asm/mach-db1x00 load-$(CONFIG_MIPS_DB1200) += 0xffffffff80100000 # +# RMI DBAu1300 development platform +# +core-$(CONFIG_MIPS_DB1300) += arch/mips/alchemy/devboards/ +cflags-$(CONFIG_MIPS_DB1300) += -I$(srctree)/arch/mips/include/asm/mach-db1x00 +load-$(CONFIG_MIPS_DB1300) += 0xffffffff80100000 + +# # AMD Alchemy Bosporus eval board # core-$(CONFIG_MIPS_BOSPORUS) += arch/mips/alchemy/devboards/
arch/mips/alchemy/Kconfig +8 -0
@@ -56,6 +56,14 @@ config MIPS_DB1200 select SYS_SUPPORTS_LITTLE_ENDIAN select SYS_HAS_EARLY_PRINTK +config MIPS_DB1300 + bool "RMI DB1300 board" + select SOC_AU1300 + select DMA_COHERENT + select MIPS_DISABLE_OBSOLETE_IDE + select SYS_SUPPORTS_LITTLE_ENDIAN + select SYS_HAS_EARLY_PRINTK + config MIPS_DB1500 bool "Alchemy DB1500 board" select SOC_AU1500
arch/mips/alchemy/devboards/Makefile +1 -0
@@ -16,5 +16,6 @@ obj-$(CONFIG_MIPS_DB1500) += db1x00/ obj-$(CONFIG_MIPS_DB1550) += db1x00/ obj-$(CONFIG_MIPS_BOSPORUS) += db1x00/ obj-$(CONFIG_MIPS_MIRAGE) += db1x00/ +obj-$(CONFIG_MIPS_DB1300) += db1300/ EXTRA_CFLAGS += -Werror
arch/mips/alchemy/devboards/db1300/Makefile new file +2 -0
@@ -0,0 +1,2 @@ +obj-y := setup.o platform.o +
arch/mips/alchemy/devboards/db1300/platform.c new file +234 -0
234 lines not on this page · raw message
arch/mips/alchemy/devboards/db1300/setup.c new file +158 -0
158 lines not on this page · raw message
arch/mips/alchemy/devboards/prom.c +4 -0
@@ -63,5 +63,9 @@ void __init prom_init(void)void prom_putchar (unsigned char c) { +#ifdef CONFIG_MIPS_DB1300 +alchemy_uart_putchar (AU1300_UART2_PHYS_ADDR , c); +#else alchemy_uart_putchar (UART0_PHYS_ADDR , c); +#endif }
arch/mips/configs/db1300_defconfig new file +1160 -0
1,160 lines not on this page · raw message
arch/mips/include/asm/mach-db1x00/bcsr.h +3 -0
@@ -34,6 +34,8 @@#define PB1200_BCSR_PHYS_ADDR 0x0D800000#define PB1200_BCSR_HEXLED_OFS 0x00400000 +#define DB1300_BCSR_PHYS_ADDR 0x19800000 +#define DB1300_BCSR_HEXLED_OFS 0x00400000enum bcsr_id {/* BCSR base 1 */
@@ -105,6 +107,7 @@ enum bcsr_whoami_boards {BCSR_WHOAMI_PB1200 =BCSR_WHOAMI_PB1200_DDR1 ,BCSR_WHOAMI_PB1200_DDR2 ,BCSR_WHOAMI_DB1200 , + BCSR_WHOAMI_DB1300, };/* STATUS reg. Unless otherwise noted, they're valid on all boards.
arch/mips/include/asm/mach-db1x00/db1300.h new file +37 -0
@@ -0,0 +1,37 @@ +/* +* RMI DB1300 board constants +*/ + +#ifndef _DB1300_H_ +#define _DB1300_H_ + +#define DB1300_FIRST_INT (AU1300_LAST_INT + 1) +#define DB1300_IDE_INT (DB1300_FIRST_INT + 0) +#define DB1300_ETH_INT (DB1300_FIRST_INT + 1) +#define DB1300_CF_INT (DB1300_FIRST_INT + 2) +#define DB1300_VIDEO_INT (DB1300_FIRST_INT + 4) +#define DB1300_HDMI_INT (DB1300_FIRST_INT + 5) +#define DB1300_DC_INT (DB1300_FIRST_INT + 6) +#define DB1300_FLASH_INT (DB1300_FIRST_INT + 7) +#define DB1300_CF_INSERT_INT (DB1300_FIRST_INT + 8) +#define DB1300_CF_EJECT_INT (DB1300_FIRST_INT + 9) +#define DB1300_AC97_INT (DB1300_FIRST_INT + 10) +#define DB1300_AC97_PEN_INT (DB1300_FIRST_INT + 11) +#define DB1300_SD1_INSERT_INT (DB1300_FIRST_INT + 12) +#define DB1300_SD1_EJECT_INT (DB1300_FIRST_INT + 13) +#define DB1300_OTG_VBUS_OC_INT (DB1300_FIRST_INT + 14) +#define DB1300_HOST_VBUS_OC_INT (DB1300_FIRST_INT + 15) +#define DB1300_LAST_INT (DB1300_FIRST_INT + 15) + +#define DB1300_ETH_PHYS_ADDR 0x19000000 +#define DB1300_ETH_PHYS_END 0x197fffff + +#define DB1300_IDE_PHYS_ADDR 0x18800000 +#define DB1300_IDE_REG_SHIFT 5 +#define DB1300_IDE_PHYS_LEN (16 << DB1300_IDE_REG_SHIFT) + +#define DB1300_NAND_PHYS_ADDR 0x20000000 +#define DB1300_NAND_PHYS_END 0x20000fff + +#endif /* _DB1300_H_ */ +
drivers/pcmcia/db1xxx_ss.c +12 -2
@@ -59,6 +59,7 @@ struct db1x_pcmcia_sock {#define BOARD_TYPE_DEFAULT 0/* most boards */ #define BOARD_TYPE_DB1200 1/* IRQs aren't gpios */ #define BOARD_TYPE_PB1100 2/* VS bits slightly different */ +#define BOARD_TYPE_DB1300 3/* no power control */ int board_type; };
@@ -161,7 +162,8 @@ static int db1x_pcmcia_setup_irqs(struct db1x_pcmcia_sock *sock)* ejection handler have been registered and the currently * active one disabled. */ -if (sock->board_type ==BOARD_TYPE_DB1200 ) { +if ((sock->board_type ==BOARD_TYPE_DB1200 ) || + (sock->board_type ==BOARD_TYPE_DB1300 )) {local_irq_save (flags); ret = request_irq(sock->insert_irq, db1200_pcmcia_cdirq,
@@ -276,7 +278,8 @@ static int db1x_pcmcia_configure(struct pcmcia_socket *skt, }/* create new voltage code */ - cr_set |= ((v <<2 ) | p) << (sock->nr *8 ); +if (sock->board_type !=BOARD_TYPE_DB1300 ) + cr_set |= ((v <<2 ) | p) << (sock->nr *8 ); changed = state->flags ^ sock->old_flags;
@@ -352,6 +355,10 @@ static int db1x_pcmcia_get_status(struct pcmcia_socket *skt,/* reset de-asserted? then we're ready */ status |= (GET_RESET (cr, sock->nr)) ?SS_READY :SS_RESET ; +/* DB1300: power is always on */ +if (sock->board_type ==BOARD_TYPE_DB1300 ) + status |=SS_POWERON |SS_3VCARD ; + *value = status;return 0 ;
@@ -426,6 +433,9 @@ static int __devinit db1x_pcmcia_socket_probe(struct platform_device *pdev) case BCSR_WHOAMI_PB1200 ... BCSR_WHOAMI_DB1200: sock->board_type =BOARD_TYPE_DB1200 ;break ; +case BCSR_WHOAMI_DB1300 : + sock->board_type =BOARD_TYPE_DB1300 ; +break ;default :printk (KERN_INFO "db1xxx-ss: unknown board %d!\n" , bid); ret = -ENODEV ;
Signature · 1 line
1.6.5.2