From 6b5012ce1fa90c0be451e73fce5f545dd1cf185d Mon Sep 17 00:00:00 2001 From: Gabor Juhos Date: Mon, 7 May 2012 17:40:15 +0000 Subject: [PATCH] pxa: remove 2.6.37 support SVN-Revision: 31643 --- target/linux/pxa/config-default | 176 ---- .../001-gumstix_verdex_pro_arch_support.patch | 835 ------------------ .../pxa/patches/002-verdex_lcd_support.patch | 52 -- .../003-gumstix_h_verdex_pro_support.patch | 211 ----- .../004-smsc911x_verdex_pro_support.patch | 102 --- .../patches/005-verdex_pcmcia_support.patch | 235 ----- .../006-define_smsc911x_for_pcmcia.patch | 37 - ...07-fix_verdex_pro_mmc_initialization.patch | 30 - .../pxa/patches/008-verdex_mtd_support.patch | 57 -- 9 files changed, 1735 deletions(-) delete mode 100644 target/linux/pxa/config-default delete mode 100644 target/linux/pxa/patches/001-gumstix_verdex_pro_arch_support.patch delete mode 100644 target/linux/pxa/patches/002-verdex_lcd_support.patch delete mode 100644 target/linux/pxa/patches/003-gumstix_h_verdex_pro_support.patch delete mode 100644 target/linux/pxa/patches/004-smsc911x_verdex_pro_support.patch delete mode 100644 target/linux/pxa/patches/005-verdex_pcmcia_support.patch delete mode 100644 target/linux/pxa/patches/006-define_smsc911x_for_pcmcia.patch delete mode 100644 target/linux/pxa/patches/007-fix_verdex_pro_mmc_initialization.patch delete mode 100644 target/linux/pxa/patches/008-verdex_mtd_support.patch diff --git a/target/linux/pxa/config-default b/target/linux/pxa/config-default deleted file mode 100644 index 9ae3e13251..0000000000 --- a/target/linux/pxa/config-default +++ /dev/null @@ -1,176 +0,0 @@ -CONFIG_ALIGNMENT_TRAP=y -CONFIG_APM_EMULATION=m -CONFIG_ARCH_GUMSTIX=y -# CONFIG_ARCH_LUBBOCK is not set -CONFIG_ARCH_MTD_XIP=y -# CONFIG_ARCH_PXA_ESERIES is not set -# CONFIG_ARCH_PXA_IDP is not set -# CONFIG_ARCH_PXA_PALM is not set -CONFIG_ARCH_PXA=y -CONFIG_ARCH_REQUIRE_GPIOLIB=y -# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set -# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set -# CONFIG_ARCH_SUPPORTS_MSI is not set -CONFIG_ARCH_SUSPEND_POSSIBLE=y -# CONFIG_ARCH_VIPER is not set -# CONFIG_ARM_THUMB is not set -CONFIG_ARM=y -# CONFIG_ARPD is not set -CONFIG_ATA=m -CONFIG_BITREVERSE=y -CONFIG_BLK_DEV_IDECS=m -# CONFIG_BLK_DEV_IDEDMA is not set -# CONFIG_BLK_DEV_INITRD is not set -CONFIG_CMDLINE="rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200" -CONFIG_COMMON_CLKDEV=y -CONFIG_CPU_32v5=y -CONFIG_CPU_32=y -CONFIG_CPU_ABRT_EV5T=y -CONFIG_CPU_CACHE_VIVT=y -CONFIG_CPU_CP15_MMU=y -CONFIG_CPU_CP15=y -CONFIG_CPU_PABRT_NOIFAR=y -CONFIG_CPU_TLB_V4WBI=y -CONFIG_CPU_XSCALE=y -# CONFIG_DEBUG_USER is not set -CONFIG_DECOMPRESS_LZMA=y -# CONFIG_DM9000 is not set -CONFIG_ENABLE_MUST_CHECK=y -# CONFIG_EPOLL is not set -# CONFIG_FPE_FASTFPE is not set -# CONFIG_FPE_NWFPE is not set -CONFIG_FRAME_POINTER=y -CONFIG_GENERIC_CLOCKEVENTS_BUILD=y -CONFIG_GENERIC_CLOCKEVENTS=y -CONFIG_GENERIC_FIND_LAST_BIT=y -CONFIG_GENERIC_GPIO=y -CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y -CONFIG_GPIOLIB=y -# CONFIG_HAMRADIO is not set -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_HAS_DMA=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT=y -CONFIG_HAVE_AOUT=y -CONFIG_HAVE_ARCH_KGDB=y -CONFIG_HAVE_CLK=y -CONFIG_HAVE_FUNCTION_TRACER=y -CONFIG_HAVE_GENERIC_DMA_COHERENT=y -CONFIG_HAVE_IDE=y -CONFIG_HAVE_KERNEL_GZIP=y -CONFIG_HAVE_KERNEL_LZMA=y -CONFIG_HAVE_KERNEL_LZO=y -CONFIG_HAVE_KPROBES=y -CONFIG_HAVE_KRETPROBES=y -CONFIG_HAVE_LATENCYTOP_SUPPORT=y -CONFIG_HAVE_OPROFILE=y -# CONFIG_HW_RANDOM is not set -CONFIG_I2C_BOARDINFO=y -CONFIG_I2C_CHARDEV=m -# CONFIG_I2C_DESIGNWARE is not set -CONFIG_I2C=m -CONFIG_I2C_PXA=m -CONFIG_I2C_PXA_SLAVE=y -CONFIG_IDE=m -CONFIG_INOTIFY_USER=y -CONFIG_INOTIFY=y -CONFIG_IWMMXT=y -# CONFIG_LEDS_GPIO is not set -CONFIG_MAC80211_DEFAULT_PS_VALUE=0 -# CONFIG_MACH_ARCOM_ZEUS is not set -# CONFIG_MACH_ARMCORE is not set -# CONFIG_MACH_BALLOON3 is not set -# CONFIG_MACH_CAPC7117 is not set -# CONFIG_MACH_CM_X300 is not set -# CONFIG_MACH_COLIBRI300 is not set -# CONFIG_MACH_COLIBRI320 is not set -# CONFIG_MACH_COLIBRI is not set -# CONFIG_MACH_CSB726 is not set -# CONFIG_MACH_EM_X270 is not set -# CONFIG_MACH_EXEDA is not set -# CONFIG_MACH_GUMSTIX_F is not set -CONFIG_MACH_GUMSTIX_VERDEX=y -# CONFIG_MACH_H4700 is not set -# CONFIG_MACH_H5000 is not set -# CONFIG_MACH_HIMALAYA is not set -# CONFIG_MACH_ICONTROL is not set -# CONFIG_MACH_INTELMOTE2 is not set -# CONFIG_MACH_LITTLETON is not set -# CONFIG_MACH_LOGICPD_PXA270 is not set -# CONFIG_MACH_MAGICIAN is not set -# CONFIG_MACH_MAINSTONE is not set -# CONFIG_MACH_MIOA701 is not set -# CONFIG_MACH_MP900C is not set -# CONFIG_MACH_PCM027 is not set -# CONFIG_MACH_RAUMFELD_CONNECTOR is not set -# CONFIG_MACH_RAUMFELD_RC is not set -# CONFIG_MACH_RAUMFELD_SPEAKER is not set -# CONFIG_MACH_SAAR is not set -# CONFIG_MACH_STARGATE2 is not set -# CONFIG_MACH_TAVOREVB is not set -# CONFIG_MACH_TAVOREVB3 is not set -# CONFIG_MACH_VPAC270 is not set -# CONFIG_MACH_XCEP is not set -# CONFIG_MACH_ZIPIT2 is not set -# CONFIG_MACH_ZYLONITE is not set -# CONFIG_MACH_ZYLONITE300 is not set -# CONFIG_MACH_ZYLONITE320 is not set -# CONFIG_MFD_T7L66XB is not set -CONFIG_MII=m -CONFIG_MMC_BLOCK=y -CONFIG_MMC_PXA=y -# CONFIG_MMC_SDHCI_PXA is not set -CONFIG_MMC=y -CONFIG_MTD_CFI_ADV_OPTIONS=y -# CONFIG_MTD_CFI_AMDSTD is not set -CONFIG_MTD_CFI_GEOMETRY=y -# CONFIG_MTD_CFI_I2 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_4 is not set -CONFIG_MTD_PHYSMAP=y -CONFIG_MTD_PXA2XX=y -# CONFIG_MTD_XIP is not set -# CONFIG_PACKET is not set -CONFIG_PAGEFLAGS_EXTENDED=y -CONFIG_PAGE_OFFSET=0xC0000000 -CONFIG_PATA_PCMCIA=m -CONFIG_PCCARD=m -# CONFIG_PCI_SYSCALL is not set -CONFIG_PCMCIA_LOAD_CIS=y -CONFIG_PCMCIA=m -CONFIG_PCMCIA_PXA2XX=m -CONFIG_PLAT_PXA=y -# CONFIG_PM_DEBUG is not set -# CONFIG_PM_RUNTIME is not set -CONFIG_PM=y -CONFIG_PXA27x=y -# CONFIG_PXA_EZX is not set -# CONFIG_PXA_SHARPSL is not set -CONFIG_SA1100_WATCHDOG=m -CONFIG_SCSI=m -# CONFIG_SCSI_MULTI_LUN is not set -# CONFIG_SCSI_PROC_FS is not set -# CONFIG_SDIO_UART is not set -# CONFIG_SERIAL_8250 is not set -CONFIG_SERIAL_PXA_CONSOLE=y -CONFIG_SERIAL_PXA=y -CONFIG_SERIO_LIBPS2=m -CONFIG_SERIO=m -# CONFIG_SERIO_RAW is not set -CONFIG_SERIO_SERPORT=m -CONFIG_SMC911X=m -CONFIG_SMC91X=m -CONFIG_SMSC911X=y -CONFIG_SPLIT_PTLOCK_CPUS=4096 -# CONFIG_SUSPEND is not set -# CONFIG_SYSCTL_SYSCALL is not set -CONFIG_SYS_SUPPORTS_APM_EMULATION=y -# CONFIG_TRIZEPS_PXA is not set -CONFIG_UID16=y -CONFIG_UNIX=m -CONFIG_VECTORS_BASE=0xffff0000 -# CONFIG_VLAN_8021Q is not set -CONFIG_XSCALE_PMU=y -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZONE_DMA_FLAG=0 diff --git a/target/linux/pxa/patches/001-gumstix_verdex_pro_arch_support.patch b/target/linux/pxa/patches/001-gumstix_verdex_pro_arch_support.patch deleted file mode 100644 index 215409d2cb..0000000000 --- a/target/linux/pxa/patches/001-gumstix_verdex_pro_arch_support.patch +++ /dev/null @@ -1,835 +0,0 @@ -From 4f4bb58cba3a6c44e9f9f113609287d9d50be9c4 Mon Sep 17 00:00:00 2001 -From: Joseph Kortje -Date: Wed, 28 Oct 2009 21:11:28 -0400 -Subject: [PATCH] [ARM] Gumstix Verdex Pro arch support - -add an option for Verdex Pro when ARCH_GUMSTIX is selected, and -factor earlier Gumstix support into a seperate option - -Signed-off-by: Bobby Powers ---- - arch/arm/mach-pxa/Kconfig | 29 +- - arch/arm/mach-pxa/Makefile | 3 +- - arch/arm/mach-pxa/gumstix-verdex.c | 749 +++++++++++++++++++++++++++ - arch/arm/mach-pxa/include/mach/mfp-pxa27x.h | 1 + - 4 files changed, 772 insertions(+), 10 deletions(-) - create mode 100644 arch/arm/mach-pxa/gumstix-verdex.c - ---- a/arch/arm/mach-pxa/Kconfig -+++ b/arch/arm/mach-pxa/Kconfig -@@ -116,23 +116,34 @@ config MACH_CAPC7117 - select PXA3xx - - config ARCH_GUMSTIX -- bool "Gumstix XScale 255 boards" -- select PXA25x -+ bool "Gumstix boards" - help -- Say Y here if you intend to run this kernel on -- Basix, Connex, ws-200ax, ws-400ax systems -+ Say Y here if you intend to run this kernel on a -+ gumstix computer. - --choice -- prompt "Gumstix Carrier/Expansion Board" - depends on ARCH_GUMSTIX - --config GUMSTIX_AM200EPD -+config MACH_GUMSTIX_F -+ bool "Gumstix Basix/Connex ..." -+ depends on ARCH_GUMSTIX -+ select PXA25x -+ -+ choice -+ prompt "Gumstix Carrier/Expansion Board" -+ depends on MACH_GUMSTIX_F -+ -+ config GUMSTIX_AM200EPD - bool "Enable AM200EPD board support" - --config GUMSTIX_AM300EPD -+ config GUMSTIX_AM300EPD - bool "Enable AM300EPD board support" - --endchoice -+ endchoice -+ -+config MACH_GUMSTIX_VERDEX -+ bool "Gumstix VERDEX ..." -+ depends on ARCH_GUMSTIX -+ select PXA27x - - config MACH_INTELMOTE2 - bool "Intel Mote 2 Platform" ---- a/arch/arm/mach-pxa/Makefile -+++ b/arch/arm/mach-pxa/Makefile -@@ -49,7 +49,8 @@ endif - obj-$(CONFIG_MACH_EM_X270) += em-x270.o - obj-$(CONFIG_MACH_CM_X300) += cm-x300.o - obj-$(CONFIG_MACH_CAPC7117) += capc7117.o mxm8x10.o --obj-$(CONFIG_ARCH_GUMSTIX) += gumstix.o -+obj-$(CONFIG_MACH_GUMSTIX_F) += gumstix.o -+obj-$(CONFIG_MACH_GUMSTIX_VERDEX) += gumstix-verdex.o - obj-$(CONFIG_GUMSTIX_AM200EPD) += am200epd.o - obj-$(CONFIG_GUMSTIX_AM300EPD) += am300epd.o - obj-$(CONFIG_MACH_INTELMOTE2) += stargate2.o ---- /dev/null -+++ b/arch/arm/mach-pxa/gumstix-verdex.c -@@ -0,0 +1,747 @@ -+/* -+ * linux/arch/arm/mach-pxa/gumstix-verdex.c -+ * -+ * Support for the Gumstix verdex motherboard. -+ * -+ * Original Author: Craig Hughes -+ * Created: Feb 14, 2008 -+ * Copyright: Craig Hughes -+ * -+ * 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. -+ * -+ * Implemented based on lubbock.c by Nicolas Pitre and code from Craig -+ * Hughes -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+ -+#include "generic.h" -+ -+#include -+ -+#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) -+ -+#include -+ -+static struct resource verdex_smsc911x_resources[] = { -+ [0] = { -+ .name = "smsc911x-memory", -+ .start = PXA_CS1_PHYS, -+ .end = PXA_CS1_PHYS + 0x000fffff, -+ .flags = IORESOURCE_MEM, -+ }, -+ [1] = { -+ .start = IRQ_GPIO(GPIO_GUMSTIX_ETH0), -+ .end = IRQ_GPIO(GPIO_GUMSTIX_ETH0), -+ .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE, -+ }, -+}; -+ -+static struct smsc911x_platform_config verdex_smsc911x_config = { -+ .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, -+ .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL, -+ .flags = SMSC911X_USE_16BIT | SMSC911X_SAVE_MAC_ADDRESS, -+ .phy_interface = PHY_INTERFACE_MODE_MII, -+}; -+ -+static struct platform_device verdex_smsc911x_device = { -+ .name = "smsc911x", -+ .id = -1, -+ .num_resources = ARRAY_SIZE(verdex_smsc911x_resources), -+ .resource = verdex_smsc911x_resources, -+ .dev = { -+ .platform_data = &verdex_smsc911x_config, -+ }, -+}; -+ -+static void __init verdex_init_smsc911x(void) -+{ -+ -+ printk(KERN_INFO "Initializing Gumstix verdex smsc911x\n"); -+ -+ if (gpio_request(GPIO_GUMSTIX_ETH0_RST, "SMSC911x_ETH0_RST") != 0) { -+ printk(KERN_ERR "could not obtain gpio for SMSC911x_ETH0_RST\n"); -+ goto err_request_gpio_eth0_rst; -+ } -+ -+ if (gpio_request(GPIO_GUMSTIX_ETH0, "SMSC911x_ETH0_IRQ") != 0) { -+ printk(KERN_ERR "could not obtain gpio for SMSC911x_ETH0_IRQ\n"); -+ goto err_request_gpio_eth0_irq; -+ } -+ -+ if (gpio_direction_output(GPIO_GUMSTIX_ETH0_RST, 0) != 0) { -+ printk(KERN_ERR "could not set SMSC911x_ETH0_RST pin to output\n"); -+ goto err_dir; -+ } -+ -+ gpio_set_value(GPIO_GUMSTIX_ETH0_RST, 0); -+ -+ msleep(500); // Hold RESET for at least 200ms -+ -+ gpio_set_value(GPIO_GUMSTIX_ETH0_RST, 1); -+ -+ msleep(50); -+ -+ if (gpio_direction_input(GPIO_GUMSTIX_ETH0) != 0) { -+ printk(KERN_ERR "could not set SMSC911x_ETH0_IRQ pin to input\n"); -+ goto err_dir; -+ } -+ -+ gpio_export(GPIO_GUMSTIX_ETH0, 0); -+ platform_device_register(&verdex_smsc911x_device); -+ return; -+ -+err_dir: -+ gpio_free(GPIO_GUMSTIX_ETH0_RST); -+ -+err_request_gpio_eth0_irq: -+ gpio_free(GPIO_GUMSTIX_ETH0); -+ -+err_request_gpio_eth0_rst: -+ return; -+} -+ -+#else -+static void __init verdex_init_smsc911x(void) { return; } -+#endif -+ -+static unsigned long verdex_pin_config[] = { -+ /* MMC */ -+ GPIO32_MMC_CLK, -+ GPIO112_MMC_CMD, -+ GPIO92_MMC_DAT_0, -+ GPIO109_MMC_DAT_1, -+ GPIO110_MMC_DAT_2, -+ GPIO111_MMC_DAT_3, -+ -+ /* BTUART */ -+ GPIO42_BTUART_RXD, -+ GPIO43_BTUART_TXD, -+ GPIO44_BTUART_CTS, -+ GPIO45_BTUART_RTS, -+ -+ /* STUART */ -+ GPIO46_STUART_RXD, -+ GPIO47_STUART_TXD, -+ -+ /* FFUART */ -+ GPIO34_FFUART_RXD, -+ GPIO39_FFUART_TXD, -+ -+ /* SSP 2 */ -+ GPIO19_SSP2_SCLK, -+ GPIO14_SSP2_SFRM, -+ GPIO13_SSP2_TXD, -+ GPIO11_SSP2_RXD, -+ -+ /* SDRAM and local bus */ -+ GPIO49_nPWE, -+ GPIO15_nCS_1, -+ -+ /* I2C */ -+ GPIO117_I2C_SCL, -+ GPIO118_I2C_SDA, -+ -+ /* PWM 0 */ -+ GPIO16_PWM0_OUT, -+ -+ /* BRIGHTNESS */ -+ GPIO17_PWM1_OUT, -+ -+ /* LCD */ -+ GPIO58_LCD_LDD_0, -+ GPIO59_LCD_LDD_1, -+ GPIO60_LCD_LDD_2, -+ GPIO61_LCD_LDD_3, -+ GPIO62_LCD_LDD_4, -+ GPIO63_LCD_LDD_5, -+ GPIO64_LCD_LDD_6, -+ GPIO65_LCD_LDD_7, -+ GPIO66_LCD_LDD_8, -+ GPIO67_LCD_LDD_9, -+ GPIO68_LCD_LDD_10, -+ GPIO69_LCD_LDD_11, -+ GPIO70_LCD_LDD_12, -+ GPIO71_LCD_LDD_13, -+ GPIO72_LCD_LDD_14, -+ GPIO73_LCD_LDD_15, -+ GPIO74_LCD_FCLK, -+ GPIO75_LCD_LCLK, -+ GPIO76_LCD_PCLK, -+#ifdef CONFIG_FB_PXA_SHARP_LQ043_PSP -+ /* DISP must be always high while screen is on */ -+ /* Done below in verdex_init */ -+#else -+ GPIO77_LCD_BIAS, -+#endif -+ -+}; -+ -+#if defined(CONFIG_PCMCIA_PXA2XX) || defined(CONFIG_PCMCIA_PXA2XX_MODULE) -+ -+static unsigned long gpio_ntschg_0[] = { -+ GPIO104_GPIO, // pxa_gpio_mode(GPIO_GUMSTIX_nCD_0_MD); -+}; -+ -+static unsigned long gpio_ntschg_1[] = { -+ GPIO18_GPIO, // pxa_gpio_mode(GPIO_GUMSTIX_nSTSCHG_1_MD); -+ GPIO36_GPIO, // pxa_gpio_mode(GPIO_GUMSTIX_nCD_1_MD); -+ GPIO27_GPIO, // pxa_gpio_mode(GPIO_GUMSTIX_PRDY_nBSY_1_MD); -+}; -+ -+static unsigned long gpio_prdy_nbsy_old[] = { -+ GPIO111_GPIO, // pxa_gpio_mode(GPIO_GUMSTIX_nSTSCHG_0_MD); -+ GPIO109_GPIO, // pxa_gpio_mode(GPIO_GUMSTIX_PRDY_nBSY_0_OLD_MD); -+}; -+ -+static unsigned long gpio_prdy_nbsy[] = { -+ GPIO96_GPIO, // pxa_gpio_mode(GPIO_GUMSTIX_PRDY_nBSY_0_MD); -+}; -+ -+static unsigned long gpio_nhw_init[] = { -+ GPIO48_nPOE, // pxa_gpio_mode(GPIO_GUMSTIX_nPOE_MD); -+ GPIO102_nPCE_1, // pxa_gpio_mode(GPIO_GUMSTIX_nPCE_1_MD); -+ GPIO105_nPCE_2, // pxa_gpio_mode(GPIO_GUMSTIX_nPCE_2_MD); -+ GPIO104_GPIO, // pxa_gpio_mode(GPIO_GUMSTIX_nCD_0_MD); -+ -+ GPIO49_nPWE, // pxa_gpio_mode(GPIO_GUMSTIX_nPWE_MD); -+ GPIO50_nPIOR, // pxa_gpio_mode(GPIO_GUMSTIX_nPIOR_MD); -+ GPIO51_nPIOW, // pxa_gpio_mode(GPIO_GUMSTIX_nPIOW_MD); -+ GPIO79_PSKTSEL, // pxa_gpio_mode(GPIO_GUMSTIX_pSKTSEL_MD); -+ GPIO55_nPREG, // pxa_gpio_mode(GPIO_GUMSTIX_nPREG_MD); -+ GPIO56_nPWAIT, // pxa_gpio_mode(GPIO_GUMSTIX_nPWAIT_MD); -+ GPIO57_nIOIS16, // pxa_gpio_mode(GPIO_GUMSTIX_nIOIS16_MD); -+}; -+ -+static int net_cf_vx_mode = 0; -+static int pcmcia_cf_nr = 2; -+ -+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); -+} -+ -+inline unsigned char __init gumstix_pcmcia_cpld_read_bits(int bits) -+{ -+ unsigned char result = 0; -+ unsigned int shift = 0; -+ while(bits--) -+ { -+ result |= !!(GPLR(GPIO_GUMSTIX_nCD_0) & GPIO_bit(GPIO_GUMSTIX_nCD_0)) << shift; -+ shift ++; -+ gumstix_pcmcia_cpld_clk(); -+ } -+ printk("CPLD responded with: %02x\n",result); -+ return result; -+} -+ -+/* We use the CPLD on the CF-CF card to read a value from a shift register. If we can read that -+ * magic sequence, then we have 2 CF cards; otherwise we assume just one -+ * The CPLD will send the value of the shift register on GPIO11 (the CD line for slot 0) -+ * when RESET is held in reset. We use GPIO48 (nPOE) as a clock signal, -+ * GPIO52/53 (card enable for both cards) to control read/write to the shift register -+ */ -+static void __init gumstix_count_cards(void) -+{ -+ -+ if ((gpio_request(GPIO_GUMSTIX_nPOE, "GPIO_GUMSTIX_nPOE") == 0) && -+ (gpio_direction_output(GPIO_GUMSTIX_nPOE, 1) == 0)) -+ gpio_export(GPIO_GUMSTIX_nPOE, 0); -+ else -+ printk(KERN_ERR "could not obtain gpio for GPIO_GUMSTIX_nPOE\n"); -+ -+ if ((gpio_request(GPIO_GUMSTIX_nPCE_1, "GPIO_GUMSTIX_nPCE_1") == 0) && -+ (gpio_direction_output(GPIO_GUMSTIX_nPCE_1, 1) == 0)) -+ gpio_export(GPIO_GUMSTIX_nPCE_1, 0); -+ else -+ printk(KERN_ERR "could not obtain gpio for GPIO_GUMSTIX_nPCE_1\n"); -+ -+ if ((gpio_request(GPIO_GUMSTIX_nPCE_2, "GPIO_GUMSTIX_nPCE_2") == 0) && -+ (gpio_direction_output(GPIO_GUMSTIX_nPCE_2, 1) == 0)) -+ gpio_export(GPIO_GUMSTIX_nPCE_2, 0); -+ else -+ printk(KERN_ERR "could not obtain gpio for GPIO_GUMSTIX_nPCE_2\n"); -+ -+ if ((gpio_request(GPIO_GUMSTIX_nCD_0, "GPIO_GUMSTIX_nCD_0") == 0) && -+ (gpio_direction_input(GPIO_GUMSTIX_nCD_0) == 0)) -+ gpio_export(GPIO_GUMSTIX_nCD_0, 0); -+ else -+ printk(KERN_ERR "could not obtain gpio for GPIO_GUMSTIX_nCD_0\n"); -+ -+ if (net_cf_vx_mode) { -+ if ((gpio_request(GPIO_GUMSTIX_CF_OLD_RESET, "GPIO_GUMSTIX_CF_OLD_RESET") == 0) && -+ (gpio_direction_output(GPIO_GUMSTIX_CF_OLD_RESET, 1) == 0)) { -+ gpio_export(GPIO_GUMSTIX_CF_OLD_RESET, 0); -+ } else { -+ printk(KERN_ERR "could not obtain gpio for GPIO_GUMSTIX_CF_OLD_RESET\n"); -+ } -+ } else { -+ if ((gpio_request(GPIO_GUMSTIX_CF_RESET, "GPIO_GUMSTIX_CF_RESET") == 0) && -+ (gpio_direction_output(GPIO_GUMSTIX_CF_RESET, 1) == 0)) { -+ gpio_export(GPIO_GUMSTIX_CF_RESET, 0); -+ } else { -+ printk(KERN_ERR "could not obtain gpio for GPIO_GUMSTIX_CF_RESET\n"); -+ } -+ } -+ -+ // 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); -+ -+ // 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); -+ -+ // We can read the bits now -- 0xC2 means "Dual compact flash" -+ if(gumstix_pcmcia_cpld_read_bits(8) != 0xC2) -+ { -+ // We do not have 2 CF slots -+ pcmcia_cf_nr = 1; -+ } -+ -+ udelay(50); -+ -+ if (net_cf_vx_mode) { -+ gpio_set_value(GPIO_GUMSTIX_CF_OLD_RESET, 0); -+ gpio_free(GPIO_GUMSTIX_CF_OLD_RESET); -+ } else { -+ gpio_set_value(GPIO_GUMSTIX_CF_RESET, 0); -+ gpio_free(GPIO_GUMSTIX_CF_RESET); -+ } -+ -+ printk(KERN_INFO "found %d CF slots\n", pcmcia_cf_nr); -+ -+ gpio_free(GPIO_GUMSTIX_nPCE_2); -+ gpio_free(GPIO_GUMSTIX_nPCE_1); -+ gpio_free(GPIO_GUMSTIX_nPOE); -+ return; -+} -+ -+#define SMC_IO_EXTENT 16 -+#define BANK_SELECT 14 -+ -+static void __init verdex_pcmcia_pin_config(void) -+{ -+ struct resource *res; -+ void *network_controller_memory; -+ struct platform_device *pdev = &verdex_smsc911x_device; -+ -+ printk(KERN_INFO "Initializing Gumstix verdex pcmcia\n"); -+ -+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0); -+ if (res == NULL) { -+ printk(KERN_ERR "no memory resource defined\n"); -+ goto err_done; -+ } -+ -+ res = request_mem_region(res->start, SMC_IO_EXTENT, "smc91x probe"); -+ if (res == NULL) { -+ printk(KERN_ERR "failed to request memory resource\n"); -+ goto err_done; -+ } -+ -+ // We check for the possibility of SMSC91c111 (reg base offset 0x300 from CS1 base) -+ network_controller_memory = ioremap(res->start + 0x300, SMC_IO_EXTENT); -+ if (network_controller_memory == NULL) { -+ printk(KERN_ERR "failed to ioremap() registers\n"); -+ goto err_free_mem; -+ } -+ -+ // Look for the special 91c111 value in the bank select register -+ if((0xff00 & readw(network_controller_memory+BANK_SELECT)) == 0x3300) { -+ printk(KERN_INFO "Detected netCF-vx board: pcmcia using older GPIO configuration\n"); -+ net_cf_vx_mode = 1; -+ } else { -+ printk(KERN_INFO "Not netCF-vx board: pcmcia using newer GPIO configuration\n"); -+ net_cf_vx_mode = 0; -+ } -+ -+ iounmap(network_controller_memory); -+err_free_mem: -+ release_mem_region(res->start, SMC_IO_EXTENT); -+err_done: -+ -+ gumstix_count_cards(); // this can update pcmcia_cf_nr -+ -+ // If pcmcia_cf_nr is 1 then we do not have 2 CF slots -+ // Note: logic sequence was altered from previous kernel revs -+ // so that this works as intended now. -+ if (pcmcia_cf_nr != 0) -+ { -+ pxa2xx_mfp_config(ARRAY_AND_SIZE(gpio_ntschg_0)); -+ -+ if(net_cf_vx_mode) -+ pxa2xx_mfp_config(gpio_prdy_nbsy_old, 1); -+ else -+ pxa2xx_mfp_config(gpio_prdy_nbsy, 1); -+ -+ } else { -+ // Note: this reconfigures pin GPIO18 to be GPIO-IN so make -+ // sure that this only gets done for the old dual slot board -+ // since that pin is an active AF1 out-mode signal (RDY) on -+ // newer boards and changing the pin mode on the newer boards -+ // would result in memory corruption for the NIC (and hang during -+ // PHY test). -+ pxa2xx_mfp_config(ARRAY_AND_SIZE(gpio_ntschg_1)); -+ } -+ -+ pxa2xx_mfp_config(ARRAY_AND_SIZE(gpio_nhw_init)); -+ return; -+} -+ -+int __init gumstix_get_cf_cards(void) -+{ -+ return pcmcia_cf_nr; -+} -+EXPORT_SYMBOL(gumstix_get_cf_cards); -+ -+#ifdef CONFIG_MACH_GUMSTIX_VERDEX -+int __init gumstix_check_if_netCF_vx(void) -+{ -+ return net_cf_vx_mode; -+} -+EXPORT_SYMBOL(gumstix_check_if_netCF_vx); -+#endif -+ -+#endif -+ -+#if defined(CONFIG_FB_PXA_SHARP_LQ043_PSP) || defined(CONFIG_FB_PXA_SAMSUNG_LTE430WQ_F0C) -+static void gumstix_lcd_backlight(int on_or_off) -+{ -+ int err; -+ err = gpio_request(17, "LCD BACKLIGHT"); -+ if (err) { -+ //pr_warning("Gumstix Verdex: Failed to request LCD Backlight gpio\n"); -+ return; -+ } -+ -+ if(on_or_off) { -+ gpio_direction_input(17); -+ } else { -+ GPCR(17) = GPIO_bit(17); -+ gpio_direction_output(17, 0); -+ GPCR(17) = GPIO_bit(17); -+ } -+ -+ return; -+} -+#endif -+ -+#ifdef CONFIG_FB_PXA_ALPS_CDOLLAR -+static struct pxafb_mode_info gumstix_fb_mode = { -+ .pixclock = 300000, -+ .xres = 240, -+ .yres = 320, -+ .bpp = 16, -+ .hsync_len = 2, -+ .left_margin = 1, -+ .right_margin = 1, -+ .vsync_len = 3, -+ .upper_margin = 0, -+ .lower_margin = 0, -+ .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, -+}; -+ -+static struct pxafb_mach_info gumstix_fb_info = { -+ .modes = &gumstix_fb_mode, -+ .num_modes = 1, -+ .lccr0 = LCCR0_Pas | LCCR0_Sngl | LCCR0_Color, -+ .lccr3 = LCCR3_PixFlEdg, -+}; -+#elif defined(CONFIG_FB_PXA_SHARP_LQ043_PSP) -+static struct pxafb_mode_info gumstix_fb_mode = { -+ .pixclock = 110000, -+ .xres = 480, -+ .yres = 272, -+ .bpp = 16, -+ .hsync_len = 41, -+ .left_margin = 2, -+ .right_margin = 2, -+ .vsync_len = 10, -+ .upper_margin = 2, -+ .lower_margin = 2, -+ .sync = 0, // Hsync and Vsync both active low -+}; -+ -+static struct pxafb_mach_info gumstix_fb_info = { -+ .modes = &gumstix_fb_mode, -+ .num_modes = 1, -+ .lccr0 = LCCR0_Act | LCCR0_Sngl | LCCR0_Color, -+ .lccr3 = LCCR3_OutEnH | LCCR3_PixFlEdg | (0 << 30), -+ .pxafb_backlight_power = &gumstix_lcd_backlight, -+}; -+#elif defined(CONFIG_FB_PXA_SAMSUNG_LTE430WQ_F0C) -+static struct pxafb_mode_info gumstix_fb_mode = { -+ .pixclock = 108696, // 9.2MHz typical DOTCLK from datasheet -+ .xres = 480, -+ .hsync_len = 41, // HLW from datasheet: 41 typ -+ .left_margin = 4, // HBP - HLW from datasheet: 45 - 41 = 4 -+ .right_margin = 8, // HFP from datasheet: 8 typ -+ .yres = 272, -+ .vsync_len = 10, // VLW from datasheet: 10 typ -+ .upper_margin = 2, // VBP - VLW from datasheet: 12 - 10 = 2 -+ .lower_margin = 4, // VFP from datasheet: 4 typ -+ .bpp = 16, -+ .sync = 0, // Hsync and Vsync both active low -+}; -+ -+static struct pxafb_mach_info gumstix_fb_info = { -+ .modes = &gumstix_fb_mode, -+ .num_modes = 1, -+ .lccr0 = LCCR0_Act | LCCR0_Sngl | LCCR0_Color, -+ .lccr3 = LCCR3_OutEnH | LCCR3_PixFlEdg | (0 << 30), -+ .pxafb_backlight_power = &gumstix_lcd_backlight, -+}; -+#endif -+ -+static struct platform_device verdex_audio_device = { -+ .name = "pxa2xx-ac97", -+ .id = -1, -+}; -+ -+static struct platform_device *devices[] __initdata = { -+ &verdex_audio_device, -+}; -+ -+/* PXA27x OHCI controller setup */ -+#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) -+static int ohci_verdex_init(struct device *dev) -+{ -+ // Turn on port 2 in host mode -+ UP2OCR = UP2OCR_HXS | UP2OCR_HXOE | UP2OCR_DPPDE | UP2OCR_DMPDE; -+ -+ /* See drivers/usb/host/ohci-pxa27x.c for further details but -+ ENABLE_PORT_ALL flag is equivalent to using this old sequence: -+ UHCHR = (UHCHR) & -+ ~(UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSEP3 | UHCHR_SSE); -+ */ -+ return 0; -+} -+ -+static struct pxaohci_platform_data verdex_ohci_platform_data = { -+ .port_mode = PMM_PERPORT_MODE, -+ .flags = ENABLE_PORT_ALL, -+ .init = ohci_verdex_init, -+}; -+ -+static void __init verdex_ohci_init(void) -+{ -+ pxa_set_ohci_info(&verdex_ohci_platform_data); -+} -+#else -+static void __init verdex_ohci_init(void) { -+ printk(KERN_INFO "Gumstix verdex host usb ohci is disabled\n"); -+} -+#endif -+ -+ -+#if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE) -+static struct pxamci_platform_data verdex_mci_platform_data; -+ -+static int verdex_mci_init(struct device *dev, irq_handler_t detect_int, -+ void *data) -+{ -+ /* GPIO setup for MMC on the 120-pin connector is done in verdex_init. -+ * There is no card detect on a uSD connector so no interrupt to register. -+ * There is no WP detect GPIO line either. -+ */ -+ -+ return 0; -+} -+ -+static struct pxamci_platform_data verdex_mci_platform_data = { -+ .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, -+ .init = verdex_mci_init, -+}; -+ -+static void __init verdex_mmc_init(void) -+{ -+ pxa_set_mci_info(&verdex_mci_platform_data); -+} -+#else -+static void __init verdex_mmc_init(void) -+{ -+ printk(KERN_INFO "Gumstix verdex mmc disabled\n"); -+} -+#endif -+ -+#if defined(CONFIG_USB_GADGET_PXA2XX) || defined(CONFIG_USB_GADGET_PXA2XX_MODULE) -+static struct pxa2xx_udc_mach_info verdex_udc_info __initdata = { -+ .gpio_vbus = GPIO35, -+ .gpio_pullup = GPIO41, -+}; -+ -+static void __init verdex_udc_init(void) -+{ -+ pxa_set_udc_info(&verdex_udc_info); -+} -+#else -+static void __init verdex_udc_init(void) -+{ -+ printk(KERN_INFO "Gumstix verdex udc is disabled\n"); -+} -+#endif -+ -+#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) -+ -+#if defined(CONFIG_TOUCHSCREEN_TSC2003) || defined(CONFIG_TOUCHSCREEN_TSC2003_MODULE) -+ -+#define VERDEX_GPIO_PENDOWN 16 -+ -+static int tsc2003_init_platform_hw(void) -+{ -+ return 0; -+} -+ -+static void tsc2003_exit_platform_hw(void) -+{ -+ return; -+} -+ -+static void tsc2003_clear_penirq(void) -+{ -+ return; -+} -+ -+static int tsc2003_get_pendown_state(void) -+{ -+ return !gpio_get_value(VERDEX_GPIO_PENDOWN); -+} -+ -+static struct tsc2007_platform_data tsc2003_config = { -+ .model = 2003, -+ .x_plate_ohms = 100, -+ .get_pendown_state = tsc2003_get_pendown_state, -+ .clear_penirq = tsc2003_clear_penirq, -+ .init_platform_hw = tsc2003_init_platform_hw, -+ .exit_platform_hw = tsc2003_exit_platform_hw, -+}; -+#endif -+ -+static struct i2c_board_info __initdata verdex_i2c_board_info[] = { -+#if defined(CONFIG_RTC_DRV_DS1307) || defined(CONFIG_RTC_DRV_DS1307_MODULE) -+ -+ { -+ I2C_BOARD_INFO("rtc-ds1307", 0x68), -+ }, -+#endif -+#if defined(CONFIG_TOUCHSCREEN_TSC2003) || defined(CONFIG_TOUCHSCREEN_TSC2003_MODULE) -+ { -+ I2C_BOARD_INFO("tsc2003", 0x48), -+ .platform_data = &tsc2003_config, -+ .irq = IRQ_GPIO(VERDEX_GPIO_PENDOWN), -+ }, -+#endif -+}; -+ -+static struct i2c_pxa_platform_data verdex_i2c_pwr_info = { -+ .fast_mode = 1, -+}; -+ -+static struct i2c_pxa_platform_data verdex_i2c_info = { -+ .fast_mode = 1, -+}; -+ -+static void __init verdex_i2c_init(void) -+{ -+ printk(KERN_INFO "Initializing Gumstix verdex i2c\n"); -+ -+#if defined(CONFIG_TOUCHSCREEN_TSC2003) || defined(CONFIG_TOUCHSCREEN_TSC2003_MODULE) -+ if ((gpio_request(VERDEX_GPIO_PENDOWN, "TSC2003_PENDOWN") == 0) && -+ (gpio_direction_input(VERDEX_GPIO_PENDOWN) == 0)) { -+ gpio_export(VERDEX_GPIO_PENDOWN, 0); -+ } else { -+ printk(KERN_ERR "could not obtain gpio for TSC2003_PENDOWN\n"); -+ return; -+ } -+#endif -+ -+ i2c_register_board_info(0, verdex_i2c_board_info, -+ ARRAY_SIZE(verdex_i2c_board_info)); -+ pxa_set_i2c_info(&verdex_i2c_info); -+ pxa27x_set_i2c_power_info(&verdex_i2c_pwr_info); -+} -+#else -+static inline void verdex_i2c_init(void) {} -+#endif -+ -+#if defined(CONFIG_PCMCIA_PXA2XX) || defined(CONFIG_PCMCIA_PXA2XX_MODULE) -+static void __init verdex_pcmcia_init(void) -+{ -+ verdex_pcmcia_pin_config(); -+} -+#else -+static void __init verdex_pcmcia_init(void) { -+ printk(KERN_INFO "Gumstix verdex pcmcia is disabled\n"); -+} -+#endif -+ -+ -+static void __init verdex_init(void) -+{ -+ pxa2xx_mfp_config(ARRAY_AND_SIZE(verdex_pin_config)); -+ -+#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); -+#endif -+ verdex_udc_init(); -+ verdex_mmc_init(); -+ verdex_ohci_init(); -+ verdex_i2c_init(); -+ verdex_init_smsc911x(); -+ verdex_pcmcia_init(); -+ -+#if defined(CONFIG_FB_PXA_ALPS_CDOLLAR) || defined(CONFIG_FB_PXA_SHARP_LQ043_PSP) || defined(CONFIG_FB_PXA_SAMSUNG_LTE430WQ_F0C) -+ printk(KERN_INFO "Initializing Gumstix verdex FB info\n"); -+ set_pxa_fb_info(&gumstix_fb_info); -+#endif -+ printk(KERN_INFO "Initializing Gumstix platform_add_devices\n"); -+ (void) platform_add_devices(devices, ARRAY_SIZE(devices)); -+} -+ -+MACHINE_START(GUMSTIX, "Gumstix verdex") -+ .boot_params = 0xa0000100, /* match u-boot bi_boot_params */ -+ .map_io = pxa_map_io, -+ .init_irq = pxa27x_init_irq, -+ .timer = &pxa_timer, -+ .init_machine = verdex_init, -+MACHINE_END -+ ---- a/arch/arm/mach-pxa/include/mach/mfp-pxa27x.h -+++ b/arch/arm/mach-pxa/include/mach/mfp-pxa27x.h -@@ -109,6 +109,7 @@ - #define GPIO54_nPCE_2 MFP_CFG_OUT(GPIO54, AF2, DRIVE_HIGH) - #define GPIO78_nPCE_2 MFP_CFG_OUT(GPIO78, AF1, DRIVE_HIGH) - #define GPIO87_nPCE_2 MFP_CFG_IN(GPIO87, AF1) -+#define GPIO105_nPCE_2 MFP_CFG_OUT(GPIO105, AF1, DRIVE_HIGH) - #define GPIO55_nPREG MFP_CFG_OUT(GPIO55, AF2, DRIVE_HIGH) - #define GPIO50_nPIOR MFP_CFG_OUT(GPIO50, AF2, DRIVE_HIGH) - #define GPIO51_nPIOW MFP_CFG_OUT(GPIO51, AF2, DRIVE_HIGH) diff --git a/target/linux/pxa/patches/002-verdex_lcd_support.patch b/target/linux/pxa/patches/002-verdex_lcd_support.patch deleted file mode 100644 index 0d60d2d016..0000000000 --- a/target/linux/pxa/patches/002-verdex_lcd_support.patch +++ /dev/null @@ -1,52 +0,0 @@ -From eb92a178eceae4e5d18bbb442b8e44cb88457d60 Mon Sep 17 00:00:00 2001 -From: Joseph Kortje -Date: Wed, 28 Oct 2009 21:25:57 -0400 -Subject: [PATCH] [ARM] Gumstix Verdex LCD config options - -add options to Kconfig for Verdex LCD support - -Signed-off-by: Bobby Powers ---- - drivers/video/Kconfig | 31 +++++++++++++++++++++++++++++++ - 1 files changed, 31 insertions(+), 0 deletions(-) - ---- a/drivers/video/Kconfig -+++ b/drivers/video/Kconfig -@@ -1822,6 +1822,37 @@ config FB_PXA - say M here and read . - - If unsure, say N. -+choice -+ depends on FB_PXA -+ prompt "LCD Panel" -+ default FB_PXA_SAMSUNG_LTE430WQ_F0C -+ -+config FB_PXA_ALPS_CDOLLAR -+ boolean "Chris Dollar's ALPS screen" -+ ---help--- -+ Enable definitions (over-ridable on the kernel command line if -+ "PXA LCD command line parameters" is also selected) for an ALPS -+ screen which Chris Dollar uses -+ -+config FB_PXA_SHARP_LQ043_PSP -+ boolean "SHARP LQ043... series" -+ ---help--- -+ Enable definitions (over-ridable on the kernel command line if -+ "PXA LCD command line parameters" is also selected) for a SHARP -+ LQ043... screen, such as the one used by the PSP. These screens are -+ the ones normally sold by gumstix with its boards. -+ -+config FB_PXA_SAMSUNG_LTE430WQ_F0C -+ boolean "Samsung LTE430WQ-F0C (standard gumstix LCD)" -+ ---help--- -+ Enable definitions for a Samsung LTE430WQ-F0C LCD panel, such as the ones resold -+ by gumstix for use with their "LCD-Ready" boards. -+ -+config FB_PXA_NONEOFTHEABOVE -+ boolean "None of the above" -+ -+endchoice -+ - - config FB_PXA_OVERLAY - bool "Support PXA27x/PXA3xx Overlay(s) as framebuffer" diff --git a/target/linux/pxa/patches/003-gumstix_h_verdex_pro_support.patch b/target/linux/pxa/patches/003-gumstix_h_verdex_pro_support.patch deleted file mode 100644 index ff94cb6b48..0000000000 --- a/target/linux/pxa/patches/003-gumstix_h_verdex_pro_support.patch +++ /dev/null @@ -1,211 +0,0 @@ -From adb6abbe4e3bc17c20cdc70e4a4357f1633d4970 Mon Sep 17 00:00:00 2001 -From: Joseph Kortje -Date: Wed, 28 Oct 2009 21:49:11 -0400 -Subject: [PATCH] [ARM] gumstix.h: Verdex Pro support - -Added a bunch of ifdefs to support both original gumstix boards -as well as the Verdex Pro in gumstix.h - -Signed-off-by: Bobby Powers ---- - arch/arm/mach-pxa/include/mach/gumstix.h | 160 ++++++++++++++++++++++++------ - 1 files changed, 130 insertions(+), 30 deletions(-) - ---- a/arch/arm/mach-pxa/include/mach/gumstix.h -+++ b/arch/arm/mach-pxa/include/mach/gumstix.h -@@ -6,6 +6,9 @@ - * published by the Free Software Foundation. - */ - -+#if !defined(__ASM_ARCH_MFP_PXA27X_H) && !defined(__ASM_ARCH_MFP_PXA25X_H) -+ #error You need to include either mfp-pxa27x.h or mfp-pxa25x.h -+#endif - - /* BTRESET - Reset line to Bluetooth module, active low signal. */ - #define GPIO_GUMSTIX_BTRESET 7 -@@ -20,9 +23,18 @@ this moves to GPIO17 and GPIO37. */ - /* GPIOx - Connects to USB D+ and used as a pull-up after GPIOn - has detected a cable insertion; driven low otherwise. */ - -+#ifndef CONFIG_MACH_GUMSTIX_VERDEX -+ - #define GPIO_GUMSTIX_USB_GPIOn 35 - #define GPIO_GUMSTIX_USB_GPIOx 41 - -+#else -+ -+#define GPIO_GUMSTIX_USB_GPIOn 100 -+#define GPIO_GUMSTIX_USB_GPIOx 27 -+ -+#endif -+ - /* usb state change */ - #define GUMSTIX_USB_INTR_IRQ IRQ_GPIO(GPIO_GUMSTIX_USB_GPIOn) - -@@ -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 - */ -+#ifndef CONFIG_MACH_GUMSTIX_VERDEX - #define GPIO_GUMSTIX_ETH0_RST 80 --#define GPIO_GUMSTIX_ETH0_RST_MD (GPIO_GUMSTIX_ETH0_RST | GPIO_OUT) -+#define GPIO_GUMSTIX_ETH0 36 -+#else -+#define GPIO_GUMSTIX_ETH0_RST 107 -+#define GPIO_GUMSTIX_ETH0 99 -+#endif - #define GPIO_GUMSTIX_ETH1_RST 52 --#define GPIO_GUMSTIX_ETH1_RST_MD (GPIO_GUMSTIX_ETH1_RST | GPIO_OUT) -+#define GPIO_GUMSTIX_ETH1 27 - --#define GPIO_GUMSTIX_ETH0 36 -+#define GPIO_GUMSTIX_ETH0_RST_MD (GPIO_GUMSTIX_ETH0_RST | GPIO_OUT) -+#define GPIO_GUMSTIX_ETH1_RST_MD (GPIO_GUMSTIX_ETH1_RST | GPIO_OUT) - #define GPIO_GUMSTIX_ETH0_MD (GPIO_GUMSTIX_ETH0 | GPIO_IN) --#define GUMSTIX_ETH0_IRQ IRQ_GPIO(GPIO_GUMSTIX_ETH0) --#define GPIO_GUMSTIX_ETH1 27 - #define GPIO_GUMSTIX_ETH1_MD (GPIO_GUMSTIX_ETH1 | GPIO_IN) --#define GUMSTIX_ETH1_IRQ IRQ_GPIO(GPIO_GUMSTIX_ETH1) - -+#define GUMSTIX_ETH0_IRQ IRQ_GPIO(GPIO_GUMSTIX_ETH0) -+#define GUMSTIX_ETH1_IRQ IRQ_GPIO(GPIO_GUMSTIX_ETH1) - - /* CF reset line */ --#define GPIO8_RESET 8 -+#define GPIO8_CF_RESET 8 -+#define GPIO97_CF_RESET 97 -+#define GPIO110_CF_RESET 110 -+ -+#ifndef CONFIG_MACH_GUMSTIX_VERDEX -+#define GPIO_GUMSTIX_CF_RESET GPIO8_CF_RESET -+#else -+#define GPIO_GUMSTIX_CF_RESET GPIO97_CF_RESET -+#endif -+ -+#define GPIO_GUMSTIX_CF_OLD_RESET GPIO110_CF_RESET -+ -+/* CF signals shared by both sockets */ -+#define GPIO_GUMSTIX_nPOE 48 -+#define GPIO_GUMSTIX_nPWE 49 -+#define GPIO_GUMSTIX_nPIOR 50 -+#define GPIO_GUMSTIX_nPIOW 51 -+ -+#ifndef CONFIG_MACH_GUMSTIX_VERDEX -+#define GPIO_GUMSTIX_nPCE_1 52 -+#define GPIO_GUMSTIX_nPCE_2 53 -+#define GPIO_GUMSTIX_pSKTSEL 54 -+#else -+#define GPIO_GUMSTIX_nPCE_1 102 -+#define GPIO_GUMSTIX_nPCE_2 105 -+#define GPIO_GUMSTIX_pSKTSEL 79 -+#endif -+ -+#define GPIO_GUMSTIX_nPREG 55 -+#define GPIO_GUMSTIX_nPWAIT 56 -+#define GPIO_GUMSTIX_nIOIS16 57 -+ -+/* Pin mode definitions correspond to mfp-pxa2[57]x.h */ -+#define GPIO_GUMSTIX_nPOE_MD GPIO48_nPOE -+#define GPIO_GUMSTIX_nPWE_MD GPIO49_nPWE -+#define GPIO_GUMSTIX_nPIOR_MD GPIO50_nPIOR -+#define GPIO_GUMSTIX_nPIOW_MD GPIO51_nPIOW -+ -+#ifndef CONFIG_MACH_GUMSTIX_VERDEX -+#define GPIO_GUMSTIX_nPCE_1_MD GPIO52_nPCE_1 -+#define GPIO_GUMSTIX_nPCE_2_MD GPIO53_nPCE_2 -+#define GPIO_GUMSTIX_pSKTSEL_MD GPIO54_pSKTSEL -+#else -+#define GPIO_GUMSTIX_nPCE_1_MD GPIO102_nPCE_1 -+#define GPIO_GUMSTIX_nPCE_2_MD GPIO105_nPCE_2 -+#define GPIO_GUMSTIX_pSKTSEL_MD GPIO79_pSKTSEL -+#endif -+ -+#define GPIO_GUMSTIX_nPREG_MD GPIO55_nPREG -+#define GPIO_GUMSTIX_nPWAIT_MD GPIO56_nPWAIT -+#define GPIO_GUMSTIX_nIOIS16_MD GPIO57_nIOIS16 - - /* CF slot 0 */ --#define GPIO4_nBVD1 4 --#define GPIO4_nSTSCHG GPIO4_nBVD1 --#define GPIO11_nCD 11 --#define GPIO26_PRDY_nBSY 26 --#define GUMSTIX_S0_nSTSCHG_IRQ IRQ_GPIO(GPIO4_nSTSCHG) --#define GUMSTIX_S0_nCD_IRQ IRQ_GPIO(GPIO11_nCD) --#define GUMSTIX_S0_PRDY_nBSY_IRQ IRQ_GPIO(GPIO26_PRDY_nBSY) -+#define GPIO4_nBVD1_0 4 -+#define GPIO4_nSTSCHG_0 GPIO4_nBVD1_0 -+#define GPIO11_nCD_0 11 -+#define GPIO26_PRDY_nBSY_0 26 -+ -+#define GPIO111_nBVD1_0 111 -+#define GPIO111_nSTSCHG_0 GPIO111_nBVD1_0 -+#define GPIO104_nCD_0 104 -+#define GPIO96_PRDY_nBSY_0 96 -+#define GPIO109_PRDY_nBSY_0 109 -+ -+#ifndef CONFIG_MACH_GUMSTIX_VERDEX -+#define GPIO_GUMSTIX_nBVD1_0 GPIO4_nBVD1_0 -+#define GPIO_GUMSTIX_nSTSCHG_0 GPIO4_nSTSCHG_0 -+#define GPIO_GUMSTIX_nCD_0 GPIO11_nCD_0 -+#define GPIO_GUMSTIX_PRDY_nBSY_0 GPIO26_PRDY_nBSY_0 -+#else -+#define GPIO_GUMSTIX_nBVD1_0 GPIO111_nBVD1_0 -+#define GPIO_GUMSTIX_nSTSCHG_0 GPIO111_nSTSCHG_0 -+#define GPIO_GUMSTIX_nCD_0 GPIO104_nCD_0 -+#define GPIO_GUMSTIX_PRDY_nBSY_0 GPIO96_PRDY_nBSY_0 -+#endif -+ -+#define GPIO_GUMSTIX_PRDY_nBSY_0_OLD GPIO109_PRDY_nBSY_0 -+ -+#define GUMSTIX_S0_nSTSCHG_IRQ IRQ_GPIO(GPIO_GUMSTIX_nSTSCHG_0) -+#define GUMSTIX_S0_nCD_IRQ IRQ_GPIO(GPIO_GUMSTIX_nCD_0) -+#define GUMSTIX_S0_PRDY_nBSY_IRQ IRQ_GPIO(GPIO_GUMSTIX_PRDY_nBSY_0) -+#define GUMSTIX_S0_PRDY_nBSY_OLD_IRQ IRQ_GPIO(GPIO_GUMSTIX_PRDY_nBSY_0_OLD) - - /* CF slot 1 */ --#define GPIO18_nBVD1 18 --#define GPIO18_nSTSCHG GPIO18_nBVD1 --#define GPIO36_nCD 36 --#define GPIO27_PRDY_nBSY 27 --#define GUMSTIX_S1_nSTSCHG_IRQ IRQ_GPIO(GPIO18_nSTSCHG) --#define GUMSTIX_S1_nCD_IRQ IRQ_GPIO(GPIO36_nCD) --#define GUMSTIX_S1_PRDY_nBSY_IRQ IRQ_GPIO(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 -+#define GPIO27_PRDY_nBSY_1 27 -+ -+#define GPIO_GUMSTIX_nBVD1_1 GPIO18_nBVD1_1 -+#define GPIO_GUMSTIX_nSTSCHG_1 GPIO18_nSTSCHG_1 -+#define GPIO_GUMSTIX_nCD_1 GPIO36_nCD_1 -+#define GPIO_GUMSTIX_PRDY_nBSY_1 GPIO27_PRDY_nBSY_1 -+ -+#define GUMSTIX_S1_nSTSCHG_IRQ IRQ_GPIO(GPIO_GUMSTIX_nSTSCHG_1) -+#define GUMSTIX_S1_nCD_IRQ IRQ_GPIO(GPIO_GUMSTIX_nCD_1) -+#define GUMSTIX_S1_PRDY_nBSY_IRQ IRQ_GPIO(GPIO_GUMSTIX_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 ) -+ -+#define GPIO_GUMSTIX_nSTSCHG_0_MD GPIO111_GPIO -+#define GPIO_GUMSTIX_nCD_0_MD GPIO104_GPIO -+ -+#define GPIO_GUMSTIX_PRDY_nBSY_0_MD GPIO96_GPIO -+#define GPIO_GUMSTIX_PRDY_nBSY_0_OLD_MD GPIO109_GPIO -+ -+#define GPIO_GUMSTIX_nSTSCHG_1_MD GPIO18_GPIO -+#define GPIO_GUMSTIX_nCD_1_MD GPIO36_GPIO -+#define GPIO_GUMSTIX_PRDY_nBSY_1_MD GPIO27_GPIO - - /* for expansion boards that can't be programatically detected */ - extern int am200_init(void); diff --git a/target/linux/pxa/patches/004-smsc911x_verdex_pro_support.patch b/target/linux/pxa/patches/004-smsc911x_verdex_pro_support.patch deleted file mode 100644 index 8eb0c1eb9e..0000000000 --- a/target/linux/pxa/patches/004-smsc911x_verdex_pro_support.patch +++ /dev/null @@ -1,102 +0,0 @@ -From 7645a459feb02f7aae4c3a5724b7800495d1b659 Mon Sep 17 00:00:00 2001 -From: Bobby Powers -Date: Wed, 28 Oct 2009 22:41:31 -0400 -Subject: [PATCH] [ARM] smsc911x: Verdex Pro support - -Basically Joseph Kortje's patch, cleaned up to apply to Linus's -tree. Some of the smsc911x.c had been applied already - -Signed-off-by: Bobby Powers ---- - drivers/net/smsc911x.c | 50 +++++++++++++++++++++++++++++++++++++-------- - drivers/net/smsc911x.h | 2 +- - include/linux/smsc911x.h | 11 ++++++++++ - 3 files changed, 53 insertions(+), 10 deletions(-) - ---- a/drivers/net/smsc911x.c -+++ b/drivers/net/smsc911x.c -@@ -1189,7 +1189,7 @@ static int smsc911x_open(struct net_devi - SMSC_WARNING(IFUP, - "Timed out waiting for EEPROM busy bit to clear"); - -- smsc911x_reg_write(pdata, GPIO_CFG, 0x70070000); -+ smsc911x_reg_write(pdata, GPIO_CFG, GPIO_CFG_LED1_EN_ | GPIO_CFG_LED2_EN_ | (1 << 20)); - - /* The soft reset above cleared the device's MAC address, - * restore it from local copy (set in probe) */ -@@ -1201,8 +1201,8 @@ static int smsc911x_open(struct net_devi - smsc911x_reg_write(pdata, INT_EN, 0); - smsc911x_reg_write(pdata, INT_STS, 0xFFFFFFFF); - -- /* Set interrupt deassertion to 100uS */ -- intcfg = ((10 << 24) | INT_CFG_IRQ_EN_); -+ /* Set interrupt deassertion to 22*10uS */ -+ intcfg = ((22 << 24) | INT_CFG_IRQ_EN_); - - if (pdata->config.irq_polarity) { - SMSC_TRACE(IFUP, "irq polarity: active high"); -@@ -1228,7 +1228,7 @@ static int smsc911x_open(struct net_devi - temp |= INT_EN_SW_INT_EN_; - smsc911x_reg_write(pdata, INT_EN, temp); - -- timeout = 1000; -+ timeout = 2000; - while (timeout--) { - if (pdata->software_irq_signal) - break; -@@ -1946,6 +1946,38 @@ static int __devexit smsc911x_drv_remove - return 0; - } - -+static inline unsigned int is_gumstix_oui(u8 *addr) -+{ -+ return (addr[0] == 0x00 && addr[1] == 0x15 && addr[2] == 0xC9); -+} -+ -+/** -+ * gen_serial_ether_addr - Generate software assigned Ethernet address -+ * based on the system_serial number -+ * @addr: Pointer to a six-byte array containing the Ethernet address -+ * -+ * Generate an Ethernet address (MAC) that is not multicast -+ * and has the local assigned bit set, keyed on the system_serial -+ */ -+static inline void gen_serial_ether_addr(u8 *addr) -+{ -+ static u8 ether_serial_digit = 0; -+ addr [0] = system_serial_high >> 8; -+ addr [1] = system_serial_high; -+ addr [2] = system_serial_low >> 24; -+ addr [3] = system_serial_low >> 16; -+ addr [4] = system_serial_low >> 8; -+ addr [5] = (system_serial_low & 0xc0) | /* top bits are from system serial */ -+ (1 << 4) | /* 2 bits identify interface type 1=ether, 2=usb, 3&4 undef */ -+ ((ether_serial_digit++) & 0x0f); /* 15 possible interfaces of each type */ -+ -+ if(!is_gumstix_oui(addr)) -+ { -+ addr [0] &= 0xfe; /* clear multicast bit */ -+ addr [0] |= 0x02; /* set local assignment bit (IEEE802) */ -+ } -+} -+ - static int __devinit smsc911x_drv_probe(struct platform_device *pdev) - { - struct net_device *dev; -@@ -2082,11 +2114,11 @@ static int __devinit smsc911x_drv_probe( - SMSC_TRACE(PROBE, - "Mac Address is read from LAN911x EEPROM"); - } else { -- /* eeprom values are invalid, generate random MAC */ -- random_ether_addr(dev->dev_addr); -- smsc911x_set_hw_mac_address(pdata, dev->dev_addr); -- SMSC_TRACE(PROBE, -- "MAC Address is set to random_ether_addr"); -+ /* eeprom values are invalid, generate MAC from serial number */ -+ gen_serial_ether_addr(dev->dev_addr); -+ smsc911x_set_hw_mac_address(pdata, dev->dev_addr); -+ SMSC_TRACE(PROBE, -+ "MAC Address is derived from system serial number"); - } - } - diff --git a/target/linux/pxa/patches/005-verdex_pcmcia_support.patch b/target/linux/pxa/patches/005-verdex_pcmcia_support.patch deleted file mode 100644 index c6a793e9f7..0000000000 --- a/target/linux/pxa/patches/005-verdex_pcmcia_support.patch +++ /dev/null @@ -1,235 +0,0 @@ -From 76a102bd5c9d792db19c6c72eafdecea0311a0c9 Mon Sep 17 00:00:00 2001 -From: Craig Hughes -Date: Fri, 30 Oct 2009 14:16:27 -0400 -Subject: [PATCH] [ARM] pxa: Gumstix Verdex PCMCIA support - -Needed for the Libertas CS wireless device. - -Signed-off-by: Bobby Powers ---- - drivers/pcmcia/Kconfig | 3 +- - drivers/pcmcia/Makefile | 3 + - drivers/pcmcia/pxa2xx_gumstix.c | 194 +++++++++++++++++++++++++++++++++++++++ - 3 files changed, 199 insertions(+), 1 deletions(-) - create mode 100644 drivers/pcmcia/pxa2xx_gumstix.c - ---- a/drivers/pcmcia/Kconfig -+++ b/drivers/pcmcia/Kconfig -@@ -215,7 +215,7 @@ config PCMCIA_PXA2XX - depends on (ARCH_LUBBOCK || MACH_MAINSTONE || PXA_SHARPSL \ - || MACH_ARMCORE || ARCH_PXA_PALM || TRIZEPS_PCMCIA \ - || ARCOM_PCMCIA || ARCH_PXA_ESERIES || MACH_STARGATE2 \ -- || MACH_VPAC270 || MACH_BALLOON3) -+ || MACH_VPAC270 || MACH_BALLOON3 || ARCH_GUMSTIX) - select PCMCIA_SOC_COMMON - help - Say Y here to include support for the PXA2xx PCMCIA controller ---- a/drivers/pcmcia/Makefile -+++ b/drivers/pcmcia/Makefile -@@ -71,6 +71,9 @@ pxa2xx-obj-$(CONFIG_MACH_STARGATE2) += - pxa2xx-obj-$(CONFIG_MACH_VPAC270) += pxa2xx_vpac270.o - pxa2xx-obj-$(CONFIG_MACH_BALLOON3) += pxa2xx_balloon3.o - -+pxa2xx-obj-$(CONFIG_MACH_GUMSTIX_VERDEX) += pxa2xx_cs.o -+pxa2xx_cs-objs := pxa2xx_gumstix.o -+ - obj-$(CONFIG_PCMCIA_PXA2XX) += pxa2xx_base.o $(pxa2xx-obj-y) - - obj-$(CONFIG_PCMCIA_XXS1500) += xxs1500_ss.o ---- /dev/null -+++ b/drivers/pcmcia/pxa2xx_gumstix.c -@@ -0,0 +1,194 @@ -+/* -+ * linux/drivers/pcmcia/pxa2xx_gumstix.c -+ * -+ * Gumstix PCMCIA specific routines. Based on Mainstone -+ * -+ * Copyright 2004, Craig Hughes -+ * -+ * 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 -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+ -+#include -+ -+#include -+#include -+ -+#ifdef CONFIG_MACH_GUMSTIX_VERDEX -+#include -+#else -+#include -+#endif -+ -+#include -+#include -+#include -+#include "soc_common.h" -+ -+#define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x) -+ -+static struct pcmcia_irqs gumstix_pcmcia_irqs0[] = { -+ { 0, GUMSTIX_S0_nCD_IRQ, "CF0 nCD" }, -+ { 0, GUMSTIX_S0_nSTSCHG_IRQ, "CF0 nSTSCHG" }, -+}; -+ -+static struct pcmcia_irqs gumstix_pcmcia_irqs1[] = { -+ { 1, GUMSTIX_S1_nCD_IRQ, "CF1 nCD" }, -+ { 1, GUMSTIX_S1_nSTSCHG_IRQ, "CF1 nSTSCHG" }, -+}; -+ -+ -+static int net_cf_vx_mode = 0; -+ -+static int gumstix_pcmcia_hw_init(struct soc_pcmcia_socket *skt) -+{ -+/* 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; -+ -+ 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)); -+} -+ -+static void gumstix_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt) -+{ -+ if(skt->nr == 0) -+ { -+ soc_pcmcia_free_irqs(skt, gumstix_pcmcia_irqs0, ARRAY_SIZE(gumstix_pcmcia_irqs0)); -+ } else { -+ soc_pcmcia_free_irqs(skt, gumstix_pcmcia_irqs1, ARRAY_SIZE(gumstix_pcmcia_irqs1)); -+ } -+ -+ if (net_cf_vx_mode) { -+ gpio_free(GPIO_GUMSTIX_CF_OLD_RESET); -+ } else { -+ gpio_free(GPIO_GUMSTIX_CF_RESET); -+ } -+ -+} -+ -+static void gumstix_pcmcia_socket_state(struct soc_pcmcia_socket *skt, -+ struct pcmcia_state *state) -+{ -+ unsigned int cd, prdy_nbsy, nbvd1; -+ if(skt->nr == 0) -+ { -+ cd = GPIO_GUMSTIX_nCD_0; -+ if(net_cf_vx_mode) -+ prdy_nbsy = GPIO_GUMSTIX_PRDY_nBSY_0_OLD; -+ else -+ prdy_nbsy = GPIO_GUMSTIX_PRDY_nBSY_0; -+ nbvd1 = GPIO_GUMSTIX_nBVD1_0; -+ } else { -+ cd = GPIO_GUMSTIX_nCD_1; -+ 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->bvd2 = 1; -+ state->vs_3v = 0; -+ state->vs_Xv = 0; -+ state->wrprot = 0; -+} -+ -+static int gumstix_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, -+ const socket_state_t *state) -+{ -+ return 0; -+} -+ -+static void gumstix_pcmcia_socket_init(struct soc_pcmcia_socket *skt) -+{ -+ if(skt->nr) { -+ soc_pcmcia_enable_irqs(skt, gumstix_pcmcia_irqs0, ARRAY_SIZE(gumstix_pcmcia_irqs0)); -+ } else { -+ soc_pcmcia_enable_irqs(skt, gumstix_pcmcia_irqs1, ARRAY_SIZE(gumstix_pcmcia_irqs1)); -+ } -+} -+ -+static void gumstix_pcmcia_socket_suspend(struct soc_pcmcia_socket *skt) -+{ -+ if(skt->nr) { -+ soc_pcmcia_disable_irqs(skt, gumstix_pcmcia_irqs0, ARRAY_SIZE(gumstix_pcmcia_irqs0)); -+ } else { -+ soc_pcmcia_disable_irqs(skt, gumstix_pcmcia_irqs1, ARRAY_SIZE(gumstix_pcmcia_irqs1)); -+ } -+} -+ -+static struct pcmcia_low_level gumstix_pcmcia_ops = { -+ .owner = THIS_MODULE, -+ .hw_init = gumstix_pcmcia_hw_init, -+ .hw_shutdown = gumstix_pcmcia_hw_shutdown, -+ .socket_state = gumstix_pcmcia_socket_state, -+ .configure_socket = gumstix_pcmcia_configure_socket, -+ .socket_init = gumstix_pcmcia_socket_init, -+ .socket_suspend = gumstix_pcmcia_socket_suspend, -+ .nr = 2, -+}; -+ -+static struct platform_device *gumstix_pcmcia_device; -+ -+extern int __init gumstix_get_cf_cards(void); -+ -+#ifdef CONFIG_MACH_GUMSTIX_VERDEX -+extern int __init gumstix_check_if_netCF_vx(void); -+#endif -+ -+static int __init gumstix_pcmcia_init(void) -+{ -+ int ret; -+ -+#ifdef CONFIG_MACH_GUMSTIX_VERDEX -+ net_cf_vx_mode = gumstix_check_if_netCF_vx(); -+#endif -+ -+ gumstix_pcmcia_ops.nr = gumstix_get_cf_cards(); -+ -+ gumstix_pcmcia_device = platform_device_alloc("pxa2xx-pcmcia", -1); -+ if (!gumstix_pcmcia_device) -+ return -ENOMEM; -+ -+ ret = platform_device_add_data(gumstix_pcmcia_device, &gumstix_pcmcia_ops, -+ sizeof(gumstix_pcmcia_ops)); -+ -+ if (ret == 0) { -+ printk(KERN_INFO "Registering gumstix PCMCIA interface.\n"); -+ ret = platform_device_add(gumstix_pcmcia_device); -+ } -+ -+ if (ret) -+ platform_device_put(gumstix_pcmcia_device); -+ -+ return ret; -+} -+ -+static void __exit gumstix_pcmcia_exit(void) -+{ -+ /* -+ * This call is supposed to free our gumstix_pcmcia_device. -+ * Unfortunately platform_device don't have a free method, and -+ * we can't assume it's free of any reference at this point so we -+ * can't free it either. -+ */ -+ platform_device_unregister(gumstix_pcmcia_device); -+} -+ -+fs_initcall(gumstix_pcmcia_init); -+module_exit(gumstix_pcmcia_exit); -+ -+MODULE_LICENSE("GPL"); diff --git a/target/linux/pxa/patches/006-define_smsc911x_for_pcmcia.patch b/target/linux/pxa/patches/006-define_smsc911x_for_pcmcia.patch deleted file mode 100644 index fe039ae62a..0000000000 --- a/target/linux/pxa/patches/006-define_smsc911x_for_pcmcia.patch +++ /dev/null @@ -1,37 +0,0 @@ -From ddd30dbf3cfd805b0de99fc581d0fa1cc7236ef9 Mon Sep 17 00:00:00 2001 -From: Bobby Powers -Date: Fri, 13 Nov 2009 01:33:05 -0500 -Subject: [PATCH] pxa: define smsc911x structures for pcmcia too - -The gumstix pcmcia support (which the wireless driver uses) needs -to know about the smsc911x platform device even if smsc811x support -is disabled, as they share resources. - -Signed-off-by: Bobby Powers ---- - arch/arm/mach-pxa/gumstix-verdex.c | 6 +++++- - 1 files changed, 5 insertions(+), 1 deletions(-) - ---- a/arch/arm/mach-pxa/gumstix-verdex.c -+++ b/arch/arm/mach-pxa/gumstix-verdex.c -@@ -51,7 +51,9 @@ - - #include - --#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) -+ -+#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) \ -+ || defined(CONFIG_PCMCIA_PXA2XX) || defined(CONFIG_PCMCIA_PXA2XX_MODULE) - - #include - -@@ -85,7 +87,9 @@ static struct platform_device verdex_sms - .platform_data = &verdex_smsc911x_config, - }, - }; -+#endif - -+#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) - static void __init verdex_init_smsc911x(void) - { - diff --git a/target/linux/pxa/patches/007-fix_verdex_pro_mmc_initialization.patch b/target/linux/pxa/patches/007-fix_verdex_pro_mmc_initialization.patch deleted file mode 100644 index 0f2332896c..0000000000 --- a/target/linux/pxa/patches/007-fix_verdex_pro_mmc_initialization.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 7169c68fec79e61549b8e9c0106dde88e4d1bf9d Mon Sep 17 00:00:00 2001 -From: Bobby Powers -Date: Thu, 29 Oct 2009 15:39:45 -0400 -Subject: [PATCH] [ARM] pxa: fix Verdex Pro mmc initialization - -The MicroSD port doesn't have card detect, read-only switch -support, and is continuously powered. Somewhere in the -forward-porting this got lost in the structure initialization. - -Signed-off-by: Bobby Powers ---- - arch/arm/mach-pxa/gumstix-verdex.c | 7 +++++-- - 1 files changed, 5 insertions(+), 2 deletions(-) - ---- a/arch/arm/mach-pxa/gumstix-verdex.c -+++ b/arch/arm/mach-pxa/gumstix-verdex.c -@@ -590,8 +590,11 @@ static int verdex_mci_init(struct device - } - - static struct pxamci_platform_data verdex_mci_platform_data = { -- .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, -- .init = verdex_mci_init, -+ .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, -+ .init = verdex_mci_init, -+ .gpio_card_detect = -1, -+ .gpio_card_ro = -1, -+ .gpio_power = -1, - }; - - static void __init verdex_mmc_init(void) diff --git a/target/linux/pxa/patches/008-verdex_mtd_support.patch b/target/linux/pxa/patches/008-verdex_mtd_support.patch deleted file mode 100644 index dbb5bf855e..0000000000 --- a/target/linux/pxa/patches/008-verdex_mtd_support.patch +++ /dev/null @@ -1,57 +0,0 @@ ---- a/arch/arm/mach-pxa/gumstix-verdex.c -+++ b/arch/arm/mach-pxa/gumstix-verdex.c -@@ -51,6 +51,46 @@ - - #include - -+static struct resource flash_resource = { -+ .start = 0x00000000, -+ .end = SZ_64M - 1, -+ .flags = IORESOURCE_MEM, -+}; -+ -+static struct mtd_partition gumstix_partitions[] = { -+ { -+ .name = "u-boot", -+ .size = 0x00040000, -+ .offset = 0, -+ .mask_flags = MTD_WRITEABLE /* force read-only */ -+ } , { -+ .name = "rootfs", -+ .size = 0x01ec0000, -+ .offset = 0x00040000 -+ } , { -+ .name = "kernel", -+ .size = 0x00100000, -+ .offset = 0x01f00000 -+ } -+}; -+ -+static struct flash_platform_data gumstix_flash_data = { -+ .map_name = "cfi_probe", -+ .parts = gumstix_partitions, -+ .nr_parts = ARRAY_SIZE(gumstix_partitions), -+ .width = 2, -+}; -+ -+static struct platform_device gumstix_flash_device = { -+ .name = "pxa2xx-flash", -+ .id = 0, -+ .dev = { -+ .platform_data = &gumstix_flash_data, -+ }, -+ .resource = &flash_resource, -+ .num_resources = 1, -+}; -+ - - #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) \ - || defined(CONFIG_PCMCIA_PXA2XX) || defined(CONFIG_PCMCIA_PXA2XX_MODULE) -@@ -540,6 +580,7 @@ static struct platform_device verdex_aud - }; - - static struct platform_device *devices[] __initdata = { -+ &gumstix_flash_device, - &verdex_audio_device, - }; - -- 2.25.1