Loading arch/arm/Kconfig +1 −1 Original line number Diff line number Diff line Loading @@ -845,7 +845,7 @@ config LEDS ARCH_LUBBOCK || MACH_MAINSTONE || ARCH_NETWINDER || \ ARCH_OMAP || ARCH_P720T || ARCH_PXA_IDP || \ ARCH_SA1100 || ARCH_SHARK || ARCH_VERSATILE || \ ARCH_AT91 || MACH_TRIZEPS4 || ARCH_DAVINCI || \ ARCH_AT91 || ARCH_DAVINCI || \ ARCH_KS8695 || MACH_RD88F5182 help If you say Y here, the LEDs on your machine will be used Loading arch/arm/mach-pxa/Kconfig +30 −2 Original line number Diff line number Diff line Loading @@ -174,13 +174,41 @@ config MACH_E800 Say Y here if you intend to run this kernel on a Toshiba e800 family PDA. config TRIZEPS_PXA bool "PXA based Keith und Koep Trizeps DIMM-Modules" config MACH_TRIZEPS4 bool "Keith und Koep Trizeps4 DIMM-Module" depends on TRIZEPS_PXA select TRIZEPS_PCMCIA select PXA27x config MACH_TRIZEPS4WL bool "Keith und Koep Trizeps4-WL DIMM-Module" depends on TRIZEPS_PXA select TRIZEPS_PCMCIA select PXA27x select PXA_SSP config MACH_TRIZEPS4_CONXS choice prompt "Select base board for Trizeps module" depends on TRIZEPS_PXA config MACH_TRIZEPS_CONXS bool "ConXS Eval Board" depends on MACH_TRIZEPS4 config MACH_TRIZEPS_UCONXS bool "uConXS Eval Board" config MACH_TRIZEPS_ANY bool "another Board" endchoice config TRIZEPS_PCMCIA bool help Enable PCMCIA support for Trizeps modules config MACH_EM_X270 bool "CompuLab EM-x270 platform" Loading arch/arm/mach-pxa/Makefile +0 −1 Original line number Diff line number Diff line Loading @@ -64,7 +64,6 @@ led-y := leds.o led-$(CONFIG_ARCH_LUBBOCK) += leds-lubbock.o led-$(CONFIG_MACH_MAINSTONE) += leds-mainstone.o led-$(CONFIG_ARCH_PXA_IDP) += leds-idp.o led-$(CONFIG_MACH_TRIZEPS4) += leds-trizeps4.o obj-$(CONFIG_LEDS) += $(led-y) Loading arch/arm/mach-pxa/include/mach/trizeps4.h +70 −14 Original line number Diff line number Diff line Loading @@ -17,11 +17,16 @@ #define TRIZEPS4_PIC_PHYS (PXA_CS3_PHYS) /* Logic chip on ConXS-Board */ #define TRIZEPS4_SDRAM_BASE 0xa0000000 /* SDRAM region */ #define TRIZEPS4_CFSR_PHYS (PXA_CS3_PHYS) /* Logic chip on ConXS-Board CSFR register */ #define TRIZEPS4_BOCR_PHYS (PXA_CS3_PHYS+0x02000000) /* Logic chip on ConXS-Board BOCR register */ #define TRIZEPS4_IRCR_PHYS (PXA_CS3_PHYS+0x02400000) /* Logic chip on ConXS-Board IRCR register*/ #define TRIZEPS4_UPSR_PHYS (PXA_CS3_PHYS+0x02800000) /* Logic chip on ConXS-Board UPSR register*/ #define TRIZEPS4_DICR_PHYS (PXA_CS3_PHYS+0x03800000) /* Logic chip on ConXS-Board DICR register*/ /* Logic on ConXS-board CSFR register*/ #define TRIZEPS4_CFSR_PHYS (PXA_CS3_PHYS) /* Logic on ConXS-board BOCR register*/ #define TRIZEPS4_BOCR_PHYS (PXA_CS3_PHYS+0x02000000) /* Logic on ConXS-board IRCR register*/ #define TRIZEPS4_IRCR_PHYS (PXA_CS3_PHYS+0x02400000) /* Logic on ConXS-board UPSR register*/ #define TRIZEPS4_UPSR_PHYS (PXA_CS3_PHYS+0x02800000) /* Logic on ConXS-board DICR register*/ #define TRIZEPS4_DICR_PHYS (PXA_CS3_PHYS+0x03800000) /* virtual memory regions */ #define TRIZEPS4_DISK_VIRT 0xF0000000 /* Disk On Chip region */ Loading Loading @@ -54,6 +59,15 @@ #define GPIO_MMC_DET 12 #define TRIZEPS4_MMC_IRQ IRQ_GPIO(GPIO_MMC_DET) /* DOC NAND chip */ #define GPIO_DOC_LOCK 94 #define GPIO_DOC_IRQ 93 #define TRIZEPS4_DOC_IRQ IRQ_GPIO(GPIO_DOC_IRQ) /* SPI interface */ #define GPIO_SPI 53 #define TRIZEPS4_SPI_IRQ IRQ_GPIO(GPIO_SPI) /* LEDS using tx2 / rx2 */ #define GPIO_SYS_BUSY_LED 46 #define GPIO_HEARTBEAT_LED 47 Loading @@ -62,6 +76,8 @@ #define GPIO_PIC 0 #define TRIZEPS4_PIC_IRQ IRQ_GPIO(GPIO_PIC) #ifdef CONFIG_MACH_TRIZEPS_CONXS /* for CONXS base board define these registers */ #define CFSR_P2V(x) ((x) - TRIZEPS4_CFSR_PHYS + TRIZEPS4_CFSR_VIRT) #define CFSR_V2P(x) ((x) - TRIZEPS4_CFSR_VIRT + TRIZEPS4_CFSR_PHYS) Loading @@ -71,15 +87,55 @@ #define DCR_P2V(x) ((x) - TRIZEPS4_DICR_PHYS + TRIZEPS4_DICR_VIRT) #define DCR_V2P(x) ((x) - TRIZEPS4_DICR_VIRT + TRIZEPS4_DICR_PHYS) #define IRCR_P2V(x) ((x) - TRIZEPS4_IRCR_PHYS + TRIZEPS4_IRCR_VIRT) #define IRCR_V2P(x) ((x) - TRIZEPS4_IRCR_VIRT + TRIZEPS4_IRCR_PHYS) #ifndef __ASSEMBLY__ #define ConXS_CFSR (*((volatile unsigned short *)CFSR_P2V(0x0C000000))) #define ConXS_BCR (*((volatile unsigned short *)BCR_P2V(0x0E000000))) #define ConXS_DCR (*((volatile unsigned short *)DCR_P2V(0x0F800000))) static inline unsigned short CFSR_readw(void) { /* [Compact Flash Status Register] is read only */ return *((unsigned short *)CFSR_P2V(0x0C000000)); } static inline void BCR_writew(unsigned short value) { /* [Board Control Regsiter] is write only */ *((unsigned short *)BCR_P2V(0x0E000000)) = value; } static inline void DCR_writew(unsigned short value) { /* [Display Control Register] is write only */ *((unsigned short *)DCR_P2V(0x0E000000)) = value; } static inline void IRCR_writew(unsigned short value) { /* [InfraRed data Control Register] is write only */ *((unsigned short *)IRCR_P2V(0x0E000000)) = value; } #else #define ConXS_CFSR CFSR_P2V(0x0C000000) #define ConXS_BCR BCR_P2V(0x0E000000) #define ConXS_DCR DCR_P2V(0x0F800000) #define ConXS_IRCR IRCR_P2V(0x0F800000) #endif #else /* for whatever baseboard define function registers */ static inline unsigned short CFSR_readw(void) { return 0; } static inline void BCR_writew(unsigned short value) { ; } static inline void DCR_writew(unsigned short value) { ; } static inline void IRCR_writew(unsigned short value) { ; } #endif /* CONFIG_MACH_TRIZEPS_CONXS */ #define ConXS_CFSR_BVD_MASK 0x0003 #define ConXS_CFSR_BVD1 (1 << 0) Loading arch/arm/mach-pxa/leds-trizeps4.cdeleted 100644 → 0 +0 −134 Original line number Diff line number Diff line /* * linux/arch/arm/mach-pxa/leds-trizeps4.c * * Author: Jürgen Schindele * Created: 20 02, 2006 * Copyright: Jürgen Schindele * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ #include <linux/init.h> #include <mach/hardware.h> #include <asm/system.h> #include <asm/types.h> #include <asm/leds.h> #include <mach/pxa-regs.h> #include <mach/pxa2xx-gpio.h> #include <mach/trizeps4.h> #include "leds.h" #define LED_STATE_ENABLED 1 #define LED_STATE_CLAIMED 2 #define SYS_BUSY 0x01 #define HEARTBEAT 0x02 #define BLINK 0x04 static unsigned int led_state; static unsigned int hw_led_state; void trizeps4_leds_event(led_event_t evt) { unsigned long flags; local_irq_save(flags); switch (evt) { case led_start: hw_led_state = 0; pxa_gpio_mode( GPIO_SYS_BUSY_LED | GPIO_OUT); /* LED1 */ pxa_gpio_mode( GPIO_HEARTBEAT_LED | GPIO_OUT); /* LED2 */ led_state = LED_STATE_ENABLED; break; case led_stop: led_state &= ~LED_STATE_ENABLED; break; case led_claim: led_state |= LED_STATE_CLAIMED; hw_led_state = 0; break; case led_release: led_state &= ~LED_STATE_CLAIMED; hw_led_state = 0; break; #ifdef CONFIG_LEDS_TIMER case led_timer: hw_led_state ^= HEARTBEAT; break; #endif #ifdef CONFIG_LEDS_CPU case led_idle_start: hw_led_state &= ~SYS_BUSY; break; case led_idle_end: hw_led_state |= SYS_BUSY; break; #endif case led_halted: break; case led_green_on: hw_led_state |= BLINK; break; case led_green_off: hw_led_state &= ~BLINK; break; case led_amber_on: break; case led_amber_off: break; case led_red_on: break; case led_red_off: break; default: break; } if (led_state & LED_STATE_ENABLED) { switch (hw_led_state) { case 0: GPSR(GPIO_SYS_BUSY_LED) |= GPIO_bit(GPIO_SYS_BUSY_LED); GPSR(GPIO_HEARTBEAT_LED) |= GPIO_bit(GPIO_HEARTBEAT_LED); break; case 1: GPCR(GPIO_SYS_BUSY_LED) |= GPIO_bit(GPIO_SYS_BUSY_LED); GPSR(GPIO_HEARTBEAT_LED) |= GPIO_bit(GPIO_HEARTBEAT_LED); break; case 2: GPSR(GPIO_SYS_BUSY_LED) |= GPIO_bit(GPIO_SYS_BUSY_LED); GPCR(GPIO_HEARTBEAT_LED) |= GPIO_bit(GPIO_HEARTBEAT_LED); break; case 3: GPCR(GPIO_SYS_BUSY_LED) |= GPIO_bit(GPIO_SYS_BUSY_LED); GPCR(GPIO_HEARTBEAT_LED) |= GPIO_bit(GPIO_HEARTBEAT_LED); break; } } else { /* turn all off */ GPSR(GPIO_SYS_BUSY_LED) |= GPIO_bit(GPIO_SYS_BUSY_LED); GPSR(GPIO_HEARTBEAT_LED) |= GPIO_bit(GPIO_HEARTBEAT_LED); } local_irq_restore(flags); } Loading
arch/arm/Kconfig +1 −1 Original line number Diff line number Diff line Loading @@ -845,7 +845,7 @@ config LEDS ARCH_LUBBOCK || MACH_MAINSTONE || ARCH_NETWINDER || \ ARCH_OMAP || ARCH_P720T || ARCH_PXA_IDP || \ ARCH_SA1100 || ARCH_SHARK || ARCH_VERSATILE || \ ARCH_AT91 || MACH_TRIZEPS4 || ARCH_DAVINCI || \ ARCH_AT91 || ARCH_DAVINCI || \ ARCH_KS8695 || MACH_RD88F5182 help If you say Y here, the LEDs on your machine will be used Loading
arch/arm/mach-pxa/Kconfig +30 −2 Original line number Diff line number Diff line Loading @@ -174,13 +174,41 @@ config MACH_E800 Say Y here if you intend to run this kernel on a Toshiba e800 family PDA. config TRIZEPS_PXA bool "PXA based Keith und Koep Trizeps DIMM-Modules" config MACH_TRIZEPS4 bool "Keith und Koep Trizeps4 DIMM-Module" depends on TRIZEPS_PXA select TRIZEPS_PCMCIA select PXA27x config MACH_TRIZEPS4WL bool "Keith und Koep Trizeps4-WL DIMM-Module" depends on TRIZEPS_PXA select TRIZEPS_PCMCIA select PXA27x select PXA_SSP config MACH_TRIZEPS4_CONXS choice prompt "Select base board for Trizeps module" depends on TRIZEPS_PXA config MACH_TRIZEPS_CONXS bool "ConXS Eval Board" depends on MACH_TRIZEPS4 config MACH_TRIZEPS_UCONXS bool "uConXS Eval Board" config MACH_TRIZEPS_ANY bool "another Board" endchoice config TRIZEPS_PCMCIA bool help Enable PCMCIA support for Trizeps modules config MACH_EM_X270 bool "CompuLab EM-x270 platform" Loading
arch/arm/mach-pxa/Makefile +0 −1 Original line number Diff line number Diff line Loading @@ -64,7 +64,6 @@ led-y := leds.o led-$(CONFIG_ARCH_LUBBOCK) += leds-lubbock.o led-$(CONFIG_MACH_MAINSTONE) += leds-mainstone.o led-$(CONFIG_ARCH_PXA_IDP) += leds-idp.o led-$(CONFIG_MACH_TRIZEPS4) += leds-trizeps4.o obj-$(CONFIG_LEDS) += $(led-y) Loading
arch/arm/mach-pxa/include/mach/trizeps4.h +70 −14 Original line number Diff line number Diff line Loading @@ -17,11 +17,16 @@ #define TRIZEPS4_PIC_PHYS (PXA_CS3_PHYS) /* Logic chip on ConXS-Board */ #define TRIZEPS4_SDRAM_BASE 0xa0000000 /* SDRAM region */ #define TRIZEPS4_CFSR_PHYS (PXA_CS3_PHYS) /* Logic chip on ConXS-Board CSFR register */ #define TRIZEPS4_BOCR_PHYS (PXA_CS3_PHYS+0x02000000) /* Logic chip on ConXS-Board BOCR register */ #define TRIZEPS4_IRCR_PHYS (PXA_CS3_PHYS+0x02400000) /* Logic chip on ConXS-Board IRCR register*/ #define TRIZEPS4_UPSR_PHYS (PXA_CS3_PHYS+0x02800000) /* Logic chip on ConXS-Board UPSR register*/ #define TRIZEPS4_DICR_PHYS (PXA_CS3_PHYS+0x03800000) /* Logic chip on ConXS-Board DICR register*/ /* Logic on ConXS-board CSFR register*/ #define TRIZEPS4_CFSR_PHYS (PXA_CS3_PHYS) /* Logic on ConXS-board BOCR register*/ #define TRIZEPS4_BOCR_PHYS (PXA_CS3_PHYS+0x02000000) /* Logic on ConXS-board IRCR register*/ #define TRIZEPS4_IRCR_PHYS (PXA_CS3_PHYS+0x02400000) /* Logic on ConXS-board UPSR register*/ #define TRIZEPS4_UPSR_PHYS (PXA_CS3_PHYS+0x02800000) /* Logic on ConXS-board DICR register*/ #define TRIZEPS4_DICR_PHYS (PXA_CS3_PHYS+0x03800000) /* virtual memory regions */ #define TRIZEPS4_DISK_VIRT 0xF0000000 /* Disk On Chip region */ Loading Loading @@ -54,6 +59,15 @@ #define GPIO_MMC_DET 12 #define TRIZEPS4_MMC_IRQ IRQ_GPIO(GPIO_MMC_DET) /* DOC NAND chip */ #define GPIO_DOC_LOCK 94 #define GPIO_DOC_IRQ 93 #define TRIZEPS4_DOC_IRQ IRQ_GPIO(GPIO_DOC_IRQ) /* SPI interface */ #define GPIO_SPI 53 #define TRIZEPS4_SPI_IRQ IRQ_GPIO(GPIO_SPI) /* LEDS using tx2 / rx2 */ #define GPIO_SYS_BUSY_LED 46 #define GPIO_HEARTBEAT_LED 47 Loading @@ -62,6 +76,8 @@ #define GPIO_PIC 0 #define TRIZEPS4_PIC_IRQ IRQ_GPIO(GPIO_PIC) #ifdef CONFIG_MACH_TRIZEPS_CONXS /* for CONXS base board define these registers */ #define CFSR_P2V(x) ((x) - TRIZEPS4_CFSR_PHYS + TRIZEPS4_CFSR_VIRT) #define CFSR_V2P(x) ((x) - TRIZEPS4_CFSR_VIRT + TRIZEPS4_CFSR_PHYS) Loading @@ -71,15 +87,55 @@ #define DCR_P2V(x) ((x) - TRIZEPS4_DICR_PHYS + TRIZEPS4_DICR_VIRT) #define DCR_V2P(x) ((x) - TRIZEPS4_DICR_VIRT + TRIZEPS4_DICR_PHYS) #define IRCR_P2V(x) ((x) - TRIZEPS4_IRCR_PHYS + TRIZEPS4_IRCR_VIRT) #define IRCR_V2P(x) ((x) - TRIZEPS4_IRCR_VIRT + TRIZEPS4_IRCR_PHYS) #ifndef __ASSEMBLY__ #define ConXS_CFSR (*((volatile unsigned short *)CFSR_P2V(0x0C000000))) #define ConXS_BCR (*((volatile unsigned short *)BCR_P2V(0x0E000000))) #define ConXS_DCR (*((volatile unsigned short *)DCR_P2V(0x0F800000))) static inline unsigned short CFSR_readw(void) { /* [Compact Flash Status Register] is read only */ return *((unsigned short *)CFSR_P2V(0x0C000000)); } static inline void BCR_writew(unsigned short value) { /* [Board Control Regsiter] is write only */ *((unsigned short *)BCR_P2V(0x0E000000)) = value; } static inline void DCR_writew(unsigned short value) { /* [Display Control Register] is write only */ *((unsigned short *)DCR_P2V(0x0E000000)) = value; } static inline void IRCR_writew(unsigned short value) { /* [InfraRed data Control Register] is write only */ *((unsigned short *)IRCR_P2V(0x0E000000)) = value; } #else #define ConXS_CFSR CFSR_P2V(0x0C000000) #define ConXS_BCR BCR_P2V(0x0E000000) #define ConXS_DCR DCR_P2V(0x0F800000) #define ConXS_IRCR IRCR_P2V(0x0F800000) #endif #else /* for whatever baseboard define function registers */ static inline unsigned short CFSR_readw(void) { return 0; } static inline void BCR_writew(unsigned short value) { ; } static inline void DCR_writew(unsigned short value) { ; } static inline void IRCR_writew(unsigned short value) { ; } #endif /* CONFIG_MACH_TRIZEPS_CONXS */ #define ConXS_CFSR_BVD_MASK 0x0003 #define ConXS_CFSR_BVD1 (1 << 0) Loading
arch/arm/mach-pxa/leds-trizeps4.cdeleted 100644 → 0 +0 −134 Original line number Diff line number Diff line /* * linux/arch/arm/mach-pxa/leds-trizeps4.c * * Author: Jürgen Schindele * Created: 20 02, 2006 * Copyright: Jürgen Schindele * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ #include <linux/init.h> #include <mach/hardware.h> #include <asm/system.h> #include <asm/types.h> #include <asm/leds.h> #include <mach/pxa-regs.h> #include <mach/pxa2xx-gpio.h> #include <mach/trizeps4.h> #include "leds.h" #define LED_STATE_ENABLED 1 #define LED_STATE_CLAIMED 2 #define SYS_BUSY 0x01 #define HEARTBEAT 0x02 #define BLINK 0x04 static unsigned int led_state; static unsigned int hw_led_state; void trizeps4_leds_event(led_event_t evt) { unsigned long flags; local_irq_save(flags); switch (evt) { case led_start: hw_led_state = 0; pxa_gpio_mode( GPIO_SYS_BUSY_LED | GPIO_OUT); /* LED1 */ pxa_gpio_mode( GPIO_HEARTBEAT_LED | GPIO_OUT); /* LED2 */ led_state = LED_STATE_ENABLED; break; case led_stop: led_state &= ~LED_STATE_ENABLED; break; case led_claim: led_state |= LED_STATE_CLAIMED; hw_led_state = 0; break; case led_release: led_state &= ~LED_STATE_CLAIMED; hw_led_state = 0; break; #ifdef CONFIG_LEDS_TIMER case led_timer: hw_led_state ^= HEARTBEAT; break; #endif #ifdef CONFIG_LEDS_CPU case led_idle_start: hw_led_state &= ~SYS_BUSY; break; case led_idle_end: hw_led_state |= SYS_BUSY; break; #endif case led_halted: break; case led_green_on: hw_led_state |= BLINK; break; case led_green_off: hw_led_state &= ~BLINK; break; case led_amber_on: break; case led_amber_off: break; case led_red_on: break; case led_red_off: break; default: break; } if (led_state & LED_STATE_ENABLED) { switch (hw_led_state) { case 0: GPSR(GPIO_SYS_BUSY_LED) |= GPIO_bit(GPIO_SYS_BUSY_LED); GPSR(GPIO_HEARTBEAT_LED) |= GPIO_bit(GPIO_HEARTBEAT_LED); break; case 1: GPCR(GPIO_SYS_BUSY_LED) |= GPIO_bit(GPIO_SYS_BUSY_LED); GPSR(GPIO_HEARTBEAT_LED) |= GPIO_bit(GPIO_HEARTBEAT_LED); break; case 2: GPSR(GPIO_SYS_BUSY_LED) |= GPIO_bit(GPIO_SYS_BUSY_LED); GPCR(GPIO_HEARTBEAT_LED) |= GPIO_bit(GPIO_HEARTBEAT_LED); break; case 3: GPCR(GPIO_SYS_BUSY_LED) |= GPIO_bit(GPIO_SYS_BUSY_LED); GPCR(GPIO_HEARTBEAT_LED) |= GPIO_bit(GPIO_HEARTBEAT_LED); break; } } else { /* turn all off */ GPSR(GPIO_SYS_BUSY_LED) |= GPIO_bit(GPIO_SYS_BUSY_LED); GPSR(GPIO_HEARTBEAT_LED) |= GPIO_bit(GPIO_HEARTBEAT_LED); } local_irq_restore(flags); }