mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 20:51:44 +00:00
[ARM] 4867/1: Adds flash, udc, mci support for gumstix F boards
This patch implements support for Gumstix-F flash, udc and mci. Fixes since the last time are: - Steve Sakoman as maintainer - cleanup for udc and mci setup Signed-off-by: Jaya Kumar <jayakumar.lkml@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
4354e18812
commit
90b8fc3496
@ -480,6 +480,12 @@ M: kernel@wantstofly.org
|
||||
L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
|
||||
S: Maintained
|
||||
|
||||
ARM/GUMSTIX MACHINE SUPPORT
|
||||
P: Steve Sakoman
|
||||
M: sakoman@gmail.com
|
||||
L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
|
||||
S: Maintained
|
||||
|
||||
ARM/HP JORNADA 7XX MACHINE SUPPORT
|
||||
P: Kristoffer Ericson
|
||||
M: kristoffer.ericson@gmail.com
|
||||
|
1149
arch/arm/configs/am200epdkit_defconfig
Normal file
1149
arch/arm/configs/am200epdkit_defconfig
Normal file
File diff suppressed because it is too large
Load Diff
@ -23,6 +23,12 @@ endif
|
||||
choice
|
||||
prompt "Select target board"
|
||||
|
||||
config ARCH_GUMSTIX
|
||||
bool "Gumstix XScale boards"
|
||||
help
|
||||
Say Y here if you intend to run this kernel on a
|
||||
Gumstix Full Function Minature Computer.
|
||||
|
||||
config ARCH_LUBBOCK
|
||||
bool "Intel DBPXA250 Development Platform"
|
||||
select PXA25x
|
||||
@ -160,6 +166,20 @@ endchoice
|
||||
|
||||
endif
|
||||
|
||||
if ARCH_GUMSTIX
|
||||
|
||||
choice
|
||||
prompt "Select target Gumstix board"
|
||||
|
||||
config MACH_GUMSTIX_F
|
||||
bool "Basix, Connex, ws-200ax, ws-400ax systems"
|
||||
select PXA25x
|
||||
|
||||
endchoice
|
||||
|
||||
endif
|
||||
|
||||
|
||||
if MACH_TRIZEPS4
|
||||
|
||||
choice
|
||||
|
@ -12,6 +12,7 @@ obj-$(CONFIG_CPU_PXA300) += pxa300.o
|
||||
obj-$(CONFIG_CPU_PXA320) += pxa320.o
|
||||
|
||||
# Specific board support
|
||||
obj-$(CONFIG_ARCH_GUMSTIX) += gumstix.o
|
||||
obj-$(CONFIG_ARCH_LUBBOCK) += lubbock.o
|
||||
obj-$(CONFIG_MACH_LOGICPD_PXA270) += lpd270.o
|
||||
obj-$(CONFIG_MACH_MAINSTONE) += mainstone.o
|
||||
|
147
arch/arm/mach-pxa/gumstix.c
Normal file
147
arch/arm/mach-pxa/gumstix.c
Normal file
@ -0,0 +1,147 @@
|
||||
/*
|
||||
* linux/arch/arm/mach-pxa/gumstix.c
|
||||
*
|
||||
* Support for the Gumstix motherboards.
|
||||
*
|
||||
* 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 <linux/module.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/mtd/mtd.h>
|
||||
#include <linux/mtd/partitions.h>
|
||||
|
||||
#include <asm/setup.h>
|
||||
#include <asm/memory.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/hardware.h>
|
||||
#include <asm/irq.h>
|
||||
#include <asm/sizes.h>
|
||||
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/map.h>
|
||||
#include <asm/mach/irq.h>
|
||||
#include <asm/mach/flash.h>
|
||||
#include <asm/arch/mmc.h>
|
||||
#include <asm/arch/udc.h>
|
||||
#include <asm/arch/gumstix.h>
|
||||
|
||||
#include <asm/arch/pxa-regs.h>
|
||||
#include <asm/arch/pxa2xx-regs.h>
|
||||
|
||||
#include "generic.h"
|
||||
|
||||
static struct resource flash_resource = {
|
||||
.start = 0x00000000,
|
||||
.end = SZ_64M - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
};
|
||||
|
||||
static struct mtd_partition gumstix_partitions[] = {
|
||||
{
|
||||
.name = "Bootloader",
|
||||
.size = 0x00040000,
|
||||
.offset = 0,
|
||||
.mask_flags = MTD_WRITEABLE /* force read-only */
|
||||
} , {
|
||||
.name = "rootfs",
|
||||
.size = MTDPART_SIZ_FULL,
|
||||
.offset = MTDPART_OFS_APPEND
|
||||
}
|
||||
};
|
||||
|
||||
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,
|
||||
};
|
||||
|
||||
static struct platform_device *devices[] __initdata = {
|
||||
&gumstix_flash_device,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_MMC_PXA
|
||||
static struct pxamci_platform_data gumstix_mci_platform_data;
|
||||
|
||||
static int gumstix_mci_init(struct device *dev, irq_handler_t detect_int,
|
||||
void *data)
|
||||
{
|
||||
pxa_gpio_mode(GPIO6_MMCCLK_MD);
|
||||
pxa_gpio_mode(GPIO53_MMCCLK_MD);
|
||||
pxa_gpio_mode(GPIO8_MMCCS0_MD);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct pxamci_platform_data gumstix_mci_platform_data = {
|
||||
.ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
|
||||
.init = gumstix_mci_init,
|
||||
};
|
||||
|
||||
static void __init gumstix_mmc_init(void)
|
||||
{
|
||||
pxa_set_mci_info(&gumstix_mci_platform_data);
|
||||
}
|
||||
#else
|
||||
static void __init gumstix_mmc_init(void)
|
||||
{
|
||||
printk(KERN_INFO "Gumstix mmc disabled\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_USB_GADGET_PXA2XX
|
||||
static struct pxa2xx_udc_mach_info gumstix_udc_info __initdata = {
|
||||
.gpio_vbus = GPIO_GUMSTIX_USB_GPIOn,
|
||||
.gpio_pullup = GPIO_GUMSTIX_USB_GPIOx,
|
||||
};
|
||||
|
||||
static void __init gumstix_udc_init(void)
|
||||
{
|
||||
pxa_set_udc_info(&gumstix_udc_info);
|
||||
}
|
||||
#else
|
||||
static void gumstix_udc_init(void)
|
||||
{
|
||||
printk(KERN_INFO "Gumstix udc is disabled\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
static void __init gumstix_init(void)
|
||||
{
|
||||
gumstix_udc_init();
|
||||
gumstix_mmc_init();
|
||||
(void) platform_add_devices(devices, ARRAY_SIZE(devices));
|
||||
}
|
||||
|
||||
MACHINE_START(GUMSTIX, "Gumstix")
|
||||
.phys_io = 0x40000000,
|
||||
.boot_params = 0xa0000100, /* match u-boot bi_boot_params */
|
||||
.io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
|
||||
.map_io = pxa_map_io,
|
||||
.init_irq = pxa25x_init_irq,
|
||||
.timer = &pxa_timer,
|
||||
.init_machine = gumstix_init,
|
||||
MACHINE_END
|
96
include/asm-arm/arch-pxa/gumstix.h
Normal file
96
include/asm-arm/arch-pxa/gumstix.h
Normal file
@ -0,0 +1,96 @@
|
||||
/*
|
||||
* linux/include/asm-arm/arch-pxa/gumstix.h
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
|
||||
/* BTRESET - Reset line to Bluetooth module, active low signal. */
|
||||
#define GPIO_GUMSTIX_BTRESET 7
|
||||
#define GPIO_GUMSTIX_BTRESET_MD (GPIO_GUMSTIX_BTRESET | GPIO_OUT)
|
||||
|
||||
|
||||
/*
|
||||
GPIOn - Input from MAX823 (or equiv), normalizing USB +5V into a clean
|
||||
interrupt signal for determining cable presence. On the original gumstix,
|
||||
this is GPIO81, and GPIO83 needs to be defined as well. On the gumstix F,
|
||||
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. */
|
||||
|
||||
#ifdef CONFIG_ARCH_GUMSTIX_ORIG
|
||||
|
||||
#define GPIO_GUMSTIX_USB_GPIOn 81
|
||||
#define GPIO_GUMSTIX_USB_GPIOx 83
|
||||
|
||||
#else
|
||||
|
||||
#define GPIO_GUMSTIX_USB_GPIOn 35
|
||||
#define GPIO_GUMSTIX_USB_GPIOx 41
|
||||
|
||||
#endif
|
||||
|
||||
/* usb state change */
|
||||
#define GUMSTIX_USB_INTR_IRQ IRQ_GPIO(GPIO_GUMSTIX_USB_GPIOn)
|
||||
|
||||
#define GPIO_GUMSTIX_USB_GPIOn_MD (GPIO_GUMSTIX_USB_GPIOn | GPIO_IN)
|
||||
#define GPIO_GUMSTIX_USB_GPIOx_CON_MD (GPIO_GUMSTIX_USB_GPIOx | GPIO_OUT)
|
||||
#define GPIO_GUMSTIX_USB_GPIOx_DIS_MD (GPIO_GUMSTIX_USB_GPIOx | GPIO_IN)
|
||||
|
||||
/*
|
||||
* SD/MMC definitions
|
||||
*/
|
||||
#define GUMSTIX_GPIO_nSD_WP 22 /* SD Write Protect */
|
||||
#define GUMSTIX_GPIO_nSD_DETECT 11 /* MMC/SD Card Detect */
|
||||
#define GUMSTIX_IRQ_GPIO_nSD_DETECT IRQ_GPIO(GUMSTIX_GPIO_nSD_DETECT)
|
||||
|
||||
/*
|
||||
* SMC Ethernet definitions
|
||||
* ETH_RST provides a hardware reset line to the ethernet chip
|
||||
* ETH is the IRQ line in from the ethernet chip to the PXA
|
||||
*/
|
||||
#define GPIO_GUMSTIX_ETH0_RST 80
|
||||
#define GPIO_GUMSTIX_ETH0_RST_MD (GPIO_GUMSTIX_ETH0_RST | GPIO_OUT)
|
||||
#define GPIO_GUMSTIX_ETH1_RST 52
|
||||
#define GPIO_GUMSTIX_ETH1_RST_MD (GPIO_GUMSTIX_ETH1_RST | GPIO_OUT)
|
||||
|
||||
#define GPIO_GUMSTIX_ETH0 36
|
||||
#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)
|
||||
|
||||
|
||||
/* CF reset line */
|
||||
#define GPIO8_RESET 8
|
||||
|
||||
/* 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)
|
||||
|
||||
/* 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)
|
Loading…
Reference in New Issue
Block a user