diff options
Diffstat (limited to 'target/linux/pxa')
-rw-r--r-- | target/linux/pxa/Makefile | 2 | ||||
-rw-r--r-- | target/linux/pxa/config-3.3 | 6 | ||||
-rw-r--r-- | target/linux/pxa/image/Makefile | 14 | ||||
-rw-r--r-- | target/linux/pxa/patches-3.3/001-gumstix_verdex_pro_arch_support.patch | 23 | ||||
-rw-r--r-- | target/linux/pxa/patches-3.3/003-gumstix_h_verdex_pro_support.patch | 37 | ||||
-rw-r--r-- | target/linux/pxa/patches-3.3/005-verdex_pcmcia_support.patch | 19 | ||||
-rw-r--r-- | target/linux/pxa/profiles/100-Default.mk | 17 | ||||
-rw-r--r-- | target/linux/pxa/profiles/200-Gumstix.mk | 17 |
8 files changed, 93 insertions, 42 deletions
diff --git a/target/linux/pxa/Makefile b/target/linux/pxa/Makefile index a433628ad..cf6fe8916 100644 --- a/target/linux/pxa/Makefile +++ b/target/linux/pxa/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk ARCH:=arm BOARD:=pxa BOARDNAME:=Marvell/Intel PXA2xx -FEATURES:=squashfs broken +FEATURES:=squashfs jffs2 MAINTAINER:=Imre Kaloz <kaloz@openwrt.org> LINUX_VERSION:=3.3.8 diff --git a/target/linux/pxa/config-3.3 b/target/linux/pxa/config-3.3 index c6103b2dc..40857399c 100644 --- a/target/linux/pxa/config-3.3 +++ b/target/linux/pxa/config-3.3 @@ -25,9 +25,7 @@ CONFIG_ARM_PATCH_PHYS_VIRT=y # CONFIG_ARM_THUMB is not set # CONFIG_ARPD is not set CONFIG_ATA=m -# CONFIG_ATMEL_PWM is not set CONFIG_AUTO_ZRELADDR=y -CONFIG_BCMA_POSSIBLE=y CONFIG_BLK_DEV_IDECS=m # CONFIG_BLK_DEV_IDEDMA is not set # CONFIG_BLK_DEV_INITRD is not set @@ -49,7 +47,6 @@ CONFIG_CPU_XSCALE=y CONFIG_DEBUG_BUGVERBOSE=y # CONFIG_DEBUG_LL_UART_NONE is not set # CONFIG_DEBUG_USER is not set -# CONFIG_DW_WATCHDOG is not set CONFIG_ENABLE_MUST_CHECK=y # CONFIG_EPOLL is not set CONFIG_FRAME_POINTER=y @@ -196,7 +193,8 @@ CONFIG_UNIX=m CONFIG_VECTORS_BASE=0xffff0000 # CONFIG_VLAN_8021Q is not set CONFIG_XSCALE_PMU=y -CONFIG_XZ_DEC=y +CONFIG_XZ_DEC_ARM=y +CONFIG_XZ_DEC_BCJ=y CONFIG_ZBOOT_ROM_BSS=0x0 CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZONE_DMA_FLAG=0 diff --git a/target/linux/pxa/image/Makefile b/target/linux/pxa/image/Makefile index 74edb62be..7f2b5d412 100644 --- a/target/linux/pxa/image/Makefile +++ b/target/linux/pxa/image/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2008-2010 OpenWrt.org +# Copyright (C) 2008-2012 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -15,8 +15,20 @@ define Image/BuildKernel cp $(KDIR)/uImage $(BIN_DIR)/$(IMG_PREFIX)-uImage endef +# Build a fake flash image for usage in Qemu +define Image/Build/Gumstix + dd if=/dev/zero bs=128k count=256 of=$(BIN_DIR)/$(IMG_PREFIX)-$(1)-qemu-flash.img + dd if=$(BIN_DIR)/openwrt-pxa-gumstix-u-boot.bin conv=notrunc bs=128k \ + of=$(BIN_DIR)/$(IMG_PREFIX)-$(1)-qemu-flash.img + dd if=$(KDIR)/root.$(1) conv=notrunc bs=128k seek=2 \ + of=$(BIN_DIR)/$(IMG_PREFIX)-$(1)-qemu-flash.img + dd if=$(KDIR)/uImage conv=notrunc bs=128k seek=248 \ + of=$(BIN_DIR)/$(IMG_PREFIX)-$(1)-qemu-flash.img +endef + define Image/Build $(call Image/Build/$(1),$(1)) + $(call Image/Build/$(PROFILE),$(1)) endef define Image/Build/jffs2-64k diff --git a/target/linux/pxa/patches-3.3/001-gumstix_verdex_pro_arch_support.patch b/target/linux/pxa/patches-3.3/001-gumstix_verdex_pro_arch_support.patch index 04d8a2f88..9d1c0c232 100644 --- a/target/linux/pxa/patches-3.3/001-gumstix_verdex_pro_arch_support.patch +++ b/target/linux/pxa/patches-3.3/001-gumstix_verdex_pro_arch_support.patch @@ -75,7 +75,7 @@ Signed-off-by: Bobby Powers <bobbypowers@gmail.com> obj-$(CONFIG_MACH_INTELMOTE2) += stargate2.o --- /dev/null +++ b/arch/arm/mach-pxa/gumstix-verdex.c -@@ -0,0 +1,793 @@ +@@ -0,0 +1,794 @@ +/* + * linux/arch/arm/mach-pxa/gumstix-verdex.c + * @@ -103,6 +103,7 @@ Signed-off-by: Bobby Powers <bobbypowers@gmail.com> +#include <linux/i2c/tsc2007.h> +#include <linux/i2c/pxa-i2c.h> +#include <linux/gpio.h> ++#include <linux/gpio-pxa.h> + +#include <asm/setup.h> +#include <asm/memory.h> @@ -371,8 +372,8 @@ Signed-off-by: Bobby Powers <bobbypowers@gmail.com> + +inline void __init gumstix_pcmcia_cpld_clk(void) +{ -+ GPCR(GPIO_GUMSTIX_nPOE) = GPIO_bit(GPIO_GUMSTIX_nPOE); -+ GPSR(GPIO_GUMSTIX_nPOE) = GPIO_bit(GPIO_GUMSTIX_nPOE); ++ gpio_set_value(GPIO_GUMSTIX_nPOE, 0); ++ gpio_set_value(GPIO_GUMSTIX_nPOE, 1); +} + +inline unsigned char __init gumstix_pcmcia_cpld_read_bits(int bits) @@ -381,7 +382,7 @@ Signed-off-by: Bobby Powers <bobbypowers@gmail.com> + unsigned int shift = 0; + while(bits--) + { -+ result |= !!(GPLR(GPIO_GUMSTIX_nCD_0) & GPIO_bit(GPIO_GUMSTIX_nCD_0)) << shift; ++ result |= !!(gpio_get_value(GPIO_GUMSTIX_nCD_0) & GPIO_bit(GPIO_GUMSTIX_nCD_0)) << shift; + shift ++; + gumstix_pcmcia_cpld_clk(); + } @@ -438,15 +439,15 @@ Signed-off-by: Bobby Powers <bobbypowers@gmail.com> + } + + // Setup the shift register -+ GPSR(GPIO_GUMSTIX_nPCE_1) = GPIO_bit(GPIO_GUMSTIX_nPCE_1); -+ GPCR(GPIO_GUMSTIX_nPCE_2) = GPIO_bit(GPIO_GUMSTIX_nPCE_2); ++ gpio_set_value(GPIO_GUMSTIX_nPCE_1, 1); ++ gpio_set_value(GPIO_GUMSTIX_nPCE_2, 0); + + // Tick the clock to program the shift register + gumstix_pcmcia_cpld_clk(); + + // Now set shift register into read mode -+ GPCR(GPIO_GUMSTIX_nPCE_1) = GPIO_bit(GPIO_GUMSTIX_nPCE_1); -+ GPSR(GPIO_GUMSTIX_nPCE_2) = GPIO_bit(GPIO_GUMSTIX_nPCE_2); ++ gpio_set_value(GPIO_GUMSTIX_nPCE_1, 0); ++ gpio_set_value(GPIO_GUMSTIX_nPCE_2, 1); + + // We can read the bits now -- 0xC2 means "Dual compact flash" + if(gumstix_pcmcia_cpld_read_bits(8) != 0xC2) @@ -574,9 +575,9 @@ Signed-off-by: Bobby Powers <bobbypowers@gmail.com> + if(on_or_off) { + gpio_direction_input(17); + } else { -+ GPCR(17) = GPIO_bit(17); ++ gpio_set_value(17, 0); + gpio_direction_output(17, 0); -+ GPCR(17) = GPIO_bit(17); ++ gpio_set_value(17, 0); + } + + return; @@ -843,7 +844,7 @@ Signed-off-by: Bobby Powers <bobbypowers@gmail.com> +#ifdef CONFIG_FB_PXA_SHARP_LQ043_PSP + /* DISP must be always high while screen is on */ + gpio_direction_output(GPIO77, 0); -+ GPSR(GPIO77) = GPIO_bit(GPIO77); ++ gpio_set_value(GPIO77, 1); +#endif + verdex_udc_init(); + verdex_mmc_init(); diff --git a/target/linux/pxa/patches-3.3/003-gumstix_h_verdex_pro_support.patch b/target/linux/pxa/patches-3.3/003-gumstix_h_verdex_pro_support.patch index 74e0c4643..6dd291d48 100644 --- a/target/linux/pxa/patches-3.3/003-gumstix_h_verdex_pro_support.patch +++ b/target/linux/pxa/patches-3.3/003-gumstix_h_verdex_pro_support.patch @@ -42,7 +42,7 @@ Signed-off-by: Bobby Powers <bobbypowers@gmail.com> /* usb state change */ #define GUMSTIX_USB_INTR_IRQ PXA_GPIO_TO_IRQ(GPIO_GUMSTIX_USB_GPIOn) -@@ -42,48 +54,135 @@ has detected a cable insertion; driven l +@@ -42,48 +54,136 @@ has detected a cable insertion; driven l * ETH_RST provides a hardware reset line to the ethernet chip * ETH is the IRQ line in from the ethernet chip to the PXA */ @@ -66,13 +66,13 @@ Signed-off-by: Bobby Powers <bobbypowers@gmail.com> -#define GPIO_GUMSTIX_ETH1 27 #define GPIO_GUMSTIX_ETH1_MD (GPIO_GUMSTIX_ETH1 | GPIO_IN) -#define GUMSTIX_ETH1_IRQ PXA_GPIO_TO_IRQ(GPIO_GUMSTIX_ETH1) +- +-/* CF reset line */ +-#define GPIO8_RESET 8 +#define GUMSTIX_ETH0_IRQ PXA_GPIO_TO_IRQ(GPIO_GUMSTIX_ETH0) +#define GUMSTIX_ETH1_IRQ PXA_GPIO_TO_IRQ(GPIO_GUMSTIX_ETH1) --/* CF reset line */ --#define GPIO8_RESET 8 -- -/* CF slot 0 */ -#define GPIO4_nBVD1 4 -#define GPIO4_nSTSCHG GPIO4_nBVD1 @@ -159,6 +159,7 @@ Signed-off-by: Bobby Powers <bobbypowers@gmail.com> +#endif + +#define GPIO_GUMSTIX_PRDY_nBSY_0_OLD GPIO109_PRDY_nBSY_0 ++#define GUMSTIX_S0_PRDY_nBSY_OLD_IRQ PXA_GPIO_TO_IRQ(GPIO109_PRDY_nBSY_0) + +#define GUMSTIX_S0_nSTSCHG_IRQ PXA_GPIO_TO_IRQ(GPIO_GUMSTIX_nSTSCHG_0) +#define GUMSTIX_S0_nCD_IRQ PXA_GPIO_TO_IRQ(GPIO_GUMSTIX_nCD_0) @@ -169,6 +170,18 @@ Signed-off-by: Bobby Powers <bobbypowers@gmail.com> -#define GPIO18_nSTSCHG GPIO18_nBVD1 -#define GPIO36_nCD 36 -#define GPIO27_PRDY_nBSY 27 +-#define GUMSTIX_S1_nSTSCHG_IRQ PXA_GPIO_TO_IRQ(GPIO18_nSTSCHG) +-#define GUMSTIX_S1_nCD_IRQ PXA_GPIO_TO_IRQ(GPIO36_nCD) +-#define GUMSTIX_S1_PRDY_nBSY_IRQ PXA_GPIO_TO_IRQ(GPIO27_PRDY_nBSY) +- +-/* CF GPIO line modes */ +-#define GPIO4_nSTSCHG_MD (GPIO4_nSTSCHG | GPIO_IN) +-#define GPIO8_RESET_MD (GPIO8_RESET | GPIO_OUT) +-#define GPIO11_nCD_MD (GPIO11_nCD | GPIO_IN) +-#define GPIO18_nSTSCHG_MD (GPIO18_nSTSCHG | GPIO_IN) +-#define GPIO26_PRDY_nBSY_MD (GPIO26_PRDY_nBSY | GPIO_IN) +-#define GPIO27_PRDY_nBSY_MD (GPIO27_PRDY_nBSY | GPIO_IN) +-#define GPIO36_nCD_MD (GPIO36_nCD | GPIO_IN) +#define GPIO18_nBVD1_1 18 +#define GPIO18_nSTSCHG_1 GPIO18_nBVD1_1 +#define GPIO36_nCD_1 36 @@ -179,18 +192,10 @@ Signed-off-by: Bobby Powers <bobbypowers@gmail.com> +#define GPIO_GUMSTIX_nCD_1 GPIO36_nCD_1 +#define GPIO_GUMSTIX_PRDY_nBSY_1 GPIO27_PRDY_nBSY_1 + - #define GUMSTIX_S1_nSTSCHG_IRQ PXA_GPIO_TO_IRQ(GPIO18_nSTSCHG) - #define GUMSTIX_S1_nCD_IRQ PXA_GPIO_TO_IRQ(GPIO36_nCD) - #define GUMSTIX_S1_PRDY_nBSY_IRQ PXA_GPIO_TO_IRQ(GPIO27_PRDY_nBSY) - --/* CF GPIO line modes */ --#define GPIO4_nSTSCHG_MD (GPIO4_nSTSCHG | GPIO_IN) --#define GPIO8_RESET_MD (GPIO8_RESET | GPIO_OUT) --#define GPIO11_nCD_MD (GPIO11_nCD | GPIO_IN) --#define GPIO18_nSTSCHG_MD (GPIO18_nSTSCHG | GPIO_IN) --#define GPIO26_PRDY_nBSY_MD (GPIO26_PRDY_nBSY | GPIO_IN) --#define GPIO27_PRDY_nBSY_MD (GPIO27_PRDY_nBSY | GPIO_IN) --#define GPIO36_nCD_MD (GPIO36_nCD | GPIO_IN) ++#define GUMSTIX_S1_nSTSCHG_IRQ PXA_GPIO_TO_IRQ(GPIO18_nSTSCHG_1) ++#define GUMSTIX_S1_nCD_IRQ PXA_GPIO_TO_IRQ(GPIO36_nCD_1) ++#define GUMSTIX_S1_PRDY_nBSY_IRQ PXA_GPIO_TO_IRQ(GPIO27_PRDY_nBSY_1) ++ +/* CF GPIO line modes - correspond to mfp-pxa2[57]x.h */ +#define GPIO_GUMSTIX_CF_RESET_MD (GPIO_GUMSTIX_CF_RESET | GPIO_OUT) +#define GPIO_GUMSTIX_CF_OLD_RESET_MD (GPIO_GUMSTIX_CF_OLD_RESET | GPIO_OUT) diff --git a/target/linux/pxa/patches-3.3/005-verdex_pcmcia_support.patch b/target/linux/pxa/patches-3.3/005-verdex_pcmcia_support.patch index f2a53d35c..f369cf21d 100644 --- a/target/linux/pxa/patches-3.3/005-verdex_pcmcia_support.patch +++ b/target/linux/pxa/patches-3.3/005-verdex_pcmcia_support.patch @@ -38,7 +38,7 @@ Signed-off-by: Bobby Powers <bobbypowers@gmail.com> obj-$(CONFIG_PCMCIA_XXS1500) += xxs1500_ss.o --- /dev/null +++ b/drivers/pcmcia/pxa2xx_gumstix.c -@@ -0,0 +1,194 @@ +@@ -0,0 +1,195 @@ +/* + * linux/drivers/pcmcia/pxa2xx_gumstix.c + * @@ -62,16 +62,14 @@ Signed-off-by: Bobby Powers <bobbypowers@gmail.com> +#include <linux/delay.h> +#include <linux/platform_device.h> + ++#include <linux/gpio-pxa.h> ++ +#include <pcmcia/ss.h> + +#include <mach/hardware.h> +#include <asm/mach-types.h> + -+#ifdef CONFIG_MACH_GUMSTIX_VERDEX -+#include <mach/pxa27x.h> -+#else +#include <mach/pxa27x.h> -+#endif + +#include <asm/io.h> +#include <mach/gpio.h> @@ -80,6 +78,9 @@ Signed-off-by: Bobby Powers <bobbypowers@gmail.com> + +#define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x) + ++#define BANK_OFF(n) (((n) < 3) ? (n) << 2 : 0x100 + (((n) - 3) << 2)) ++#define GPLR(x) __REG2(0x40E00000, BANK_OFF((x) >> 5)) ++ +static struct pcmcia_irqs gumstix_pcmcia_irqs0[] = { + { 0, GUMSTIX_S0_nCD_IRQ, "CF0 nCD" }, + { 0, GUMSTIX_S0_nSTSCHG_IRQ, "CF0 nSTSCHG" }, @@ -98,7 +99,7 @@ Signed-off-by: Bobby Powers <bobbypowers@gmail.com> +/* Note: The verdex_pcmcia_pin_config is moved to gumstix_verdex.c in order to use mfp_pxa2xx_config + for board-specific pin configuration instead of the old deprecated pxa_gpio_mode function. Thus, + only the IRQ init is still needed to be done here. */ -+ skt->irq = (skt->nr == 0) ? ((net_cf_vx_mode == 0) ? GUMSTIX_S0_PRDY_nBSY_IRQ : GUMSTIX_S0_PRDY_nBSY_OLD_IRQ) : GUMSTIX_S1_PRDY_nBSY_IRQ; ++ skt->socket.pci_irq = (skt->nr == 0) ? ((net_cf_vx_mode == 0) ? GUMSTIX_S0_PRDY_nBSY_IRQ : GUMSTIX_S0_PRDY_nBSY_OLD_IRQ) : GUMSTIX_S1_PRDY_nBSY_IRQ; + + return (skt->nr == 0) ? soc_pcmcia_request_irqs(skt, gumstix_pcmcia_irqs0, ARRAY_SIZE(gumstix_pcmcia_irqs0)) : + soc_pcmcia_request_irqs(skt, gumstix_pcmcia_irqs1, ARRAY_SIZE(gumstix_pcmcia_irqs1)); @@ -138,9 +139,9 @@ Signed-off-by: Bobby Powers <bobbypowers@gmail.com> + prdy_nbsy = GPIO_GUMSTIX_PRDY_nBSY_1; + nbvd1 = GPIO_GUMSTIX_nBVD1_1; + } -+ state->detect = !(GPLR(cd) & GPIO_bit(cd)); -+ state->ready = !!(GPLR(prdy_nbsy) & GPIO_bit(prdy_nbsy)); -+ state->bvd1 = !!(GPLR(nbvd1) & GPIO_bit(nbvd1)); ++ state->detect = !!gpio_get_value(cd); ++ state->ready = !!gpio_get_value(prdy_nbsy); ++ state->bvd1 = !!gpio_get_value(nbvd1); + state->bvd2 = 1; + state->vs_3v = 0; + state->vs_Xv = 0; diff --git a/target/linux/pxa/profiles/100-Default.mk b/target/linux/pxa/profiles/100-Default.mk new file mode 100644 index 000000000..566a43f7b --- /dev/null +++ b/target/linux/pxa/profiles/100-Default.mk @@ -0,0 +1,17 @@ +# +# Copyright (C) 2012 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +define Profile/Default + NAME:=Default Profile + PACKAGES:= +endef + +define Profile/Default/Description + Default PXA Profile +endef +$(eval $(call Profile,Default)) + diff --git a/target/linux/pxa/profiles/200-Gumstix.mk b/target/linux/pxa/profiles/200-Gumstix.mk new file mode 100644 index 000000000..f296414d4 --- /dev/null +++ b/target/linux/pxa/profiles/200-Gumstix.mk @@ -0,0 +1,17 @@ +# +# Copyright (C) 2012 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +define Profile/Gumstix + NAME:=Gumstix + PACKAGES:=uboot-pxa-gumstix +endef + +define Profile/Atheros-ath5k/Description + Package set compatible with the Gumstix boards +endef +$(eval $(call Profile,Gumstix)) + |