diff options
Diffstat (limited to 'arch/arm/mach-nomadik')
23 files changed, 133 insertions, 1065 deletions
diff --git a/arch/arm/mach-nomadik/Kconfig b/arch/arm/mach-nomadik/Kconfig index 71f3ea62397..3c61096c862 100644 --- a/arch/arm/mach-nomadik/Kconfig +++ b/arch/arm/mach-nomadik/Kconfig @@ -1,22 +1,30 @@ -if ARCH_NOMADIK +menuconfig ARCH_NOMADIK +	bool "ST-Ericsson Nomadik" +	depends on ARCH_MULTI_V5 +	select ARCH_REQUIRE_GPIOLIB +	select ARM_AMBA +	select ARM_VIC +	select CLKSRC_NOMADIK_MTU +	select CLKSRC_NOMADIK_MTU_SCHED_CLOCK +	select CPU_ARM926T +	select MIGHT_HAVE_CACHE_L2X0 +	select PINCTRL +	select PINCTRL_NOMADIK +	select PINCTRL_STN8815 +	help +	  Support for the Nomadik platform by ST-Ericsson -menu "Nomadik boards" +if ARCH_NOMADIK  config MACH_NOMADIK_8815NHK  	bool "ST 8815 Nomadik Hardware Kit (evaluation board)"  	select NOMADIK_8815 -	select HAS_MTU -	select NOMADIK_GPIO +	select I2C +	select I2C_ALGOBIT +	select I2C_NOMADIK -endmenu +endif  config NOMADIK_8815 +	depends on ARCH_NOMADIK  	bool - -config I2C_BITBANG_8815NHK -	tristate "Driver for bit-bang busses found on the 8815 NHK" -	depends on I2C && MACH_NOMADIK_8815NHK -	select I2C_ALGOBIT -	default y - -endif diff --git a/arch/arm/mach-nomadik/Makefile b/arch/arm/mach-nomadik/Makefile index a6bbd1a7b4e..1071c3b04d1 100644 --- a/arch/arm/mach-nomadik/Makefile +++ b/arch/arm/mach-nomadik/Makefile @@ -7,13 +7,5 @@  # Object file lists. -obj-y			+= clock.o -  # Cpu revision  obj-$(CONFIG_NOMADIK_8815) += cpu-8815.o - -# Specific board support -obj-$(CONFIG_MACH_NOMADIK_8815NHK) += board-nhk8815.o - -# Nomadik extra devices -obj-$(CONFIG_I2C_BITBANG_8815NHK) += i2c-8815nhk.o diff --git a/arch/arm/mach-nomadik/Makefile.boot b/arch/arm/mach-nomadik/Makefile.boot deleted file mode 100644 index c7e75acfe6c..00000000000 --- a/arch/arm/mach-nomadik/Makefile.boot +++ /dev/null @@ -1,4 +0,0 @@ -   zreladdr-y	:= 0x00008000 -params_phys-y	:= 0x00000100 -initrd_phys-y	:= 0x00800000 - diff --git a/arch/arm/mach-nomadik/board-nhk8815.c b/arch/arm/mach-nomadik/board-nhk8815.c deleted file mode 100644 index 139930350d9..00000000000 --- a/arch/arm/mach-nomadik/board-nhk8815.c +++ /dev/null @@ -1,284 +0,0 @@ -/* - *  linux/arch/arm/mach-nomadik/board-8815nhk.c - * - *  Copyright (C) STMicroelectronics - * - * 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. - * - *  NHK15 board specifc driver definition - */ -#include <linux/types.h> -#include <linux/kernel.h> -#include <linux/init.h> -#include <linux/platform_device.h> -#include <linux/amba/bus.h> -#include <linux/interrupt.h> -#include <linux/gpio.h> -#include <linux/mtd/mtd.h> -#include <linux/mtd/nand.h> -#include <linux/mtd/onenand.h> -#include <linux/mtd/partitions.h> -#include <linux/io.h> -#include <asm/sizes.h> -#include <asm/mach-types.h> -#include <asm/mach/arch.h> -#include <asm/mach/irq.h> -#include <asm/mach/flash.h> - -#include <plat/mtu.h> - -#include <mach/setup.h> -#include <mach/nand.h> -#include <mach/fsmc.h> - -/* Initial value for SRC control register: all timers use MXTAL/8 source */ -#define SRC_CR_INIT_MASK	0x00007fff -#define SRC_CR_INIT_VAL		0x2aaa8000 - -/* These addresses span 16MB, so use three individual pages */ -static struct resource nhk8815_nand_resources[] = { -	{ -		.name = "nand_addr", -		.start = NAND_IO_ADDR, -		.end = NAND_IO_ADDR + 0xfff, -		.flags = IORESOURCE_MEM, -	}, { -		.name = "nand_cmd", -		.start = NAND_IO_CMD, -		.end = NAND_IO_CMD + 0xfff, -		.flags = IORESOURCE_MEM, -	}, { -		.name = "nand_data", -		.start = NAND_IO_DATA, -		.end = NAND_IO_DATA + 0xfff, -		.flags = IORESOURCE_MEM, -	} -}; - -static int nhk8815_nand_init(void) -{ -	/* FSMC setup for nand chip select (8-bit nand in 8815NHK) */ -	writel(0x0000000E, FSMC_PCR(0)); -	writel(0x000D0A00, FSMC_PMEM(0)); -	writel(0x00100A00, FSMC_PATT(0)); - -	/* enable access to the chip select area */ -	writel(readl(FSMC_PCR(0)) | 0x04, FSMC_PCR(0)); - -	return 0; -} - -/* - * These partitions are the same as those used in the 2.6.20 release - * shipped by the vendor; the first two partitions are mandated - * by the boot ROM, and the bootloader area is somehow oversized... - */ -static struct mtd_partition nhk8815_partitions[] = { -	{ -		.name	= "X-Loader(NAND)", -		.offset = 0, -		.size	= SZ_256K, -	}, { -		.name	= "MemInit(NAND)", -		.offset	= MTDPART_OFS_APPEND, -		.size	= SZ_256K, -	}, { -		.name	= "BootLoader(NAND)", -		.offset	= MTDPART_OFS_APPEND, -		.size	= SZ_2M, -	}, { -		.name	= "Kernel zImage(NAND)", -		.offset	= MTDPART_OFS_APPEND, -		.size	= 3 * SZ_1M, -	}, { -		.name	= "Root Filesystem(NAND)", -		.offset	= MTDPART_OFS_APPEND, -		.size	= 22 * SZ_1M, -	}, { -		.name	= "User Filesystem(NAND)", -		.offset	= MTDPART_OFS_APPEND, -		.size	= MTDPART_SIZ_FULL, -	} -}; - -static struct nomadik_nand_platform_data nhk8815_nand_data = { -	.parts		= nhk8815_partitions, -	.nparts		= ARRAY_SIZE(nhk8815_partitions), -	.options	= NAND_COPYBACK | NAND_CACHEPRG | NAND_NO_PADDING \ -			| NAND_NO_READRDY | NAND_NO_AUTOINCR, -	.init		= nhk8815_nand_init, -}; - -static struct platform_device nhk8815_nand_device = { -	.name		= "nomadik_nand", -	.dev		= { -		.platform_data = &nhk8815_nand_data, -	}, -	.resource	= nhk8815_nand_resources, -	.num_resources	= ARRAY_SIZE(nhk8815_nand_resources), -}; - -/* These are the partitions for the OneNand device, different from above */ -static struct mtd_partition nhk8815_onenand_partitions[] = { -	{ -		.name	= "X-Loader(OneNAND)", -		.offset = 0, -		.size	= SZ_256K, -	}, { -		.name	= "MemInit(OneNAND)", -		.offset	= MTDPART_OFS_APPEND, -		.size	= SZ_256K, -	}, { -		.name	= "BootLoader(OneNAND)", -		.offset	= MTDPART_OFS_APPEND, -		.size	= SZ_2M-SZ_256K, -	}, { -		.name	= "SysImage(OneNAND)", -		.offset	= MTDPART_OFS_APPEND, -		.size	= 4 * SZ_1M, -	}, { -		.name	= "Root Filesystem(OneNAND)", -		.offset	= MTDPART_OFS_APPEND, -		.size	= 22 * SZ_1M, -	}, { -		.name	= "User Filesystem(OneNAND)", -		.offset	= MTDPART_OFS_APPEND, -		.size	= MTDPART_SIZ_FULL, -	} -}; - -static struct onenand_platform_data nhk8815_onenand_data = { -	.parts		= nhk8815_onenand_partitions, -	.nr_parts	= ARRAY_SIZE(nhk8815_onenand_partitions), -}; - -static struct resource nhk8815_onenand_resource[] = { -	{ -		.start		= 0x30000000, -		.end		= 0x30000000 + SZ_128K - 1, -		.flags		= IORESOURCE_MEM, -	}, -}; - -static struct platform_device nhk8815_onenand_device = { -	.name		= "onenand-flash", -	.id		= -1, -	.dev		= { -		.platform_data	= &nhk8815_onenand_data, -	}, -	.resource	= nhk8815_onenand_resource, -	.num_resources	= ARRAY_SIZE(nhk8815_onenand_resource), -}; - -static void __init nhk8815_onenand_init(void) -{ -#ifdef CONFIG_MTD_ONENAND -       /* Set up SMCS0 for OneNand */ -	writel(0x000030db, FSMC_BCR(0)); -	writel(0x02100551, FSMC_BTR(0)); -#endif -} - -#define __MEM_4K_RESOURCE(x) \ -	.res = {.start = (x), .end = (x) + SZ_4K - 1, .flags = IORESOURCE_MEM} - -static struct amba_device uart0_device = { -	.dev = { .init_name = "uart0" }, -	__MEM_4K_RESOURCE(NOMADIK_UART0_BASE), -	.irq = {IRQ_UART0, NO_IRQ}, -}; - -static struct amba_device uart1_device = { -	.dev = { .init_name = "uart1" }, -	__MEM_4K_RESOURCE(NOMADIK_UART1_BASE), -	.irq = {IRQ_UART1, NO_IRQ}, -}; - -static struct amba_device *amba_devs[] __initdata = { -	&uart0_device, -	&uart1_device, -}; - -static struct resource nhk8815_eth_resources[] = { -	{ -		.name = "smc91x-regs", -		.start = 0x34000000 + 0x300, -		.end = 0x34000000 + SZ_64K - 1, -		.flags = IORESOURCE_MEM, -	}, { -		.start = NOMADIK_GPIO_TO_IRQ(115), -		.end = NOMADIK_GPIO_TO_IRQ(115), -		.flags = IORESOURCE_IRQ | IRQF_TRIGGER_RISING, -	} -}; - -static struct platform_device nhk8815_eth_device = { -	.name = "smc91x", -	.resource = nhk8815_eth_resources, -	.num_resources = ARRAY_SIZE(nhk8815_eth_resources), -}; - -static int __init nhk8815_eth_init(void) -{ -	int gpio_nr = 115; /* hardwired in the board */ -	int err; - -	err = gpio_request(gpio_nr, "eth_irq"); -	if (!err) err = nmk_gpio_set_mode(gpio_nr, NMK_GPIO_ALT_GPIO); -	if (!err) err = gpio_direction_input(gpio_nr); -	if (err) -		pr_err("Error %i in %s\n", err, __func__); -	return err; -} -device_initcall(nhk8815_eth_init); - -static struct platform_device *nhk8815_platform_devices[] __initdata = { -	&nhk8815_nand_device, -	&nhk8815_onenand_device, -	&nhk8815_eth_device, -	/* will add more devices */ -}; - -static void __init nomadik_timer_init(void) -{ -	u32 src_cr; - -	/* Configure timer sources in "system reset controller" ctrl reg */ -	src_cr = readl(io_p2v(NOMADIK_SRC_BASE)); -	src_cr &= SRC_CR_INIT_MASK; -	src_cr |= SRC_CR_INIT_VAL; -	writel(src_cr, io_p2v(NOMADIK_SRC_BASE)); - -	/* Save global pointer to mtu, used by platform timer code */ -	mtu_base = io_p2v(NOMADIK_MTU0_BASE); - -	nmdk_timer_init(); -} - -static struct sys_timer nomadik_timer = { -	.init	= nomadik_timer_init, -}; - -static void __init nhk8815_platform_init(void) -{ -	int i; - -	cpu8815_platform_init(); -	nhk8815_onenand_init(); -	platform_add_devices(nhk8815_platform_devices, -			     ARRAY_SIZE(nhk8815_platform_devices)); - -	for (i = 0; i < ARRAY_SIZE(amba_devs); i++) -		amba_device_register(amba_devs[i], &iomem_resource); -} - -MACHINE_START(NOMADIK, "NHK8815") -	/* Maintainer: ST MicroElectronics */ -	.boot_params	= 0x100, -	.map_io		= cpu8815_map_io, -	.init_irq	= cpu8815_init_irq, -	.timer		= &nomadik_timer, -	.init_machine	= nhk8815_platform_init, -MACHINE_END diff --git a/arch/arm/mach-nomadik/clock.c b/arch/arm/mach-nomadik/clock.c deleted file mode 100644 index 89f793adf77..00000000000 --- a/arch/arm/mach-nomadik/clock.c +++ /dev/null @@ -1,75 +0,0 @@ -/* - *  linux/arch/arm/mach-nomadik/clock.c - * - *  Copyright (C) 2009 Alessandro Rubini - */ -#include <linux/kernel.h> -#include <linux/module.h> -#include <linux/errno.h> -#include <linux/clk.h> -#include <asm/clkdev.h> -#include "clock.h" - -/* - * The nomadik board uses generic clocks, but the serial pl011 file - * calls clk_enable(), clk_disable(), clk_get_rate(), so we provide them - */ -unsigned long clk_get_rate(struct clk *clk) -{ -	return clk->rate; -} -EXPORT_SYMBOL(clk_get_rate); - -/* enable and disable do nothing */ -int clk_enable(struct clk *clk) -{ -	return 0; -} -EXPORT_SYMBOL(clk_enable); - -void clk_disable(struct clk *clk) -{ -} -EXPORT_SYMBOL(clk_disable); - -static struct clk clk_24 = { -	.rate = 2400000, -}; - -static struct clk clk_48 = { -	.rate = 48 * 1000 * 1000, -}; - -/* - * Catch-all default clock to satisfy drivers using the clk API.  We don't - * model the actual hardware clocks yet. - */ -static struct clk clk_default; - -#define CLK(_clk, dev)				\ -	{					\ -		.clk		= _clk,		\ -		.dev_id		= dev,		\ -	} - -static struct clk_lookup lookups[] = { -	{ -		.con_id		= "apb_pclk", -		.clk		= &clk_default, -	}, -	CLK(&clk_24, "mtu0"), -	CLK(&clk_24, "mtu1"), -	CLK(&clk_48, "uart0"), -	CLK(&clk_48, "uart1"), -	CLK(&clk_default, "gpio.0"), -	CLK(&clk_default, "gpio.1"), -	CLK(&clk_default, "gpio.2"), -	CLK(&clk_default, "gpio.3"), -	CLK(&clk_default, "rng"), -}; - -int __init clk_init(void) -{ -	clkdev_add_table(lookups, ARRAY_SIZE(lookups)); -	return 0; -} diff --git a/arch/arm/mach-nomadik/clock.h b/arch/arm/mach-nomadik/clock.h deleted file mode 100644 index 78da2e7c398..00000000000 --- a/arch/arm/mach-nomadik/clock.h +++ /dev/null @@ -1,15 +0,0 @@ - -/* - *  linux/arch/arm/mach-nomadik/clock.h - * - *  Copyright (C) 2009 Alessandro Rubini - * - * 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. - */ -struct clk { -	unsigned long		rate; -}; - -int __init clk_init(void); diff --git a/arch/arm/mach-nomadik/cpu-8815.c b/arch/arm/mach-nomadik/cpu-8815.c index ac58e3b03b1..9116ca476d7 100644 --- a/arch/arm/mach-nomadik/cpu-8815.c +++ b/arch/arm/mach-nomadik/cpu-8815.c @@ -21,146 +21,138 @@  #include <linux/device.h>  #include <linux/amba/bus.h>  #include <linux/platform_device.h> +#include <linux/io.h> +#include <linux/slab.h> +#include <linux/irq.h> +#include <linux/dma-mapping.h> +#include <linux/of_irq.h> +#include <linux/of_gpio.h> +#include <linux/of_address.h> +#include <linux/of_platform.h>  #include <linux/gpio.h> -#include <mach/hardware.h> -#include <mach/irqs.h> +#include <asm/mach/arch.h>  #include <asm/mach/map.h> -#include <asm/hardware/vic.h> +#include <asm/mach/time.h> +#include <asm/mach-types.h>  #include <asm/cacheflush.h>  #include <asm/hardware/cache-l2x0.h> -#include "clock.h" - -#define __MEM_4K_RESOURCE(x) \ -	.res = {.start = (x), .end = (x) + SZ_4K - 1, .flags = IORESOURCE_MEM} - -/* The 8815 has 4 GPIO blocks, let's register them immediately */ - -#define GPIO_RESOURCE(block)						\ -	{								\ -		.start	= NOMADIK_GPIO##block##_BASE,			\ -		.end	= NOMADIK_GPIO##block##_BASE + SZ_4K - 1,	\ -		.flags	= IORESOURCE_MEM,				\ -	},								\ -	{								\ -		.start	= IRQ_GPIO##block,				\ -		.end	= IRQ_GPIO##block,				\ -		.flags	= IORESOURCE_IRQ,				\ -	} - -#define GPIO_DEVICE(block)						\ -	{								\ -		.name 		= "gpio",				\ -		.id		= block,				\ -		.num_resources 	= 2,					\ -		.resource	= &cpu8815_gpio_resources[block * 2],	\ -		.dev = {						\ -			.platform_data = &cpu8815_gpio[block],		\ -		},							\ -	} - -static struct nmk_gpio_platform_data cpu8815_gpio[] = { +/* + * These are the only hard-coded address offsets we still have to use. + */ +#define NOMADIK_FSMC_BASE	0x10100000	/* FSMC registers */ +#define NOMADIK_SDRAMC_BASE	0x10110000	/* SDRAM Controller */ +#define NOMADIK_CLCDC_BASE	0x10120000	/* CLCD Controller */ +#define NOMADIK_MDIF_BASE	0x10120000	/* MDIF */ +#define NOMADIK_DMA0_BASE	0x10130000	/* DMA0 Controller */ +#define NOMADIK_IC_BASE		0x10140000	/* Vectored Irq Controller */ +#define NOMADIK_DMA1_BASE	0x10150000	/* DMA1 Controller */ +#define NOMADIK_USB_BASE	0x10170000	/* USB-OTG conf reg base */ +#define NOMADIK_CRYP_BASE	0x10180000	/* Crypto processor */ +#define NOMADIK_SHA1_BASE	0x10190000	/* SHA-1 Processor */ +#define NOMADIK_XTI_BASE	0x101A0000	/* XTI */ +#define NOMADIK_RNG_BASE	0x101B0000	/* Random number generator */ +#define NOMADIK_SRC_BASE	0x101E0000	/* SRC base */ +#define NOMADIK_WDOG_BASE	0x101E1000	/* Watchdog */ +#define NOMADIK_MTU0_BASE	0x101E2000	/* Multiple Timer 0 */ +#define NOMADIK_MTU1_BASE	0x101E3000	/* Multiple Timer 1 */ +#define NOMADIK_GPIO0_BASE	0x101E4000	/* GPIO0 */ +#define NOMADIK_GPIO1_BASE	0x101E5000	/* GPIO1 */ +#define NOMADIK_GPIO2_BASE	0x101E6000	/* GPIO2 */ +#define NOMADIK_GPIO3_BASE	0x101E7000	/* GPIO3 */ +#define NOMADIK_RTC_BASE	0x101E8000	/* Real Time Clock base */ +#define NOMADIK_PMU_BASE	0x101E9000	/* Power Management Unit */ +#define NOMADIK_OWM_BASE	0x101EA000	/* One wire master */ +#define NOMADIK_SCR_BASE	0x101EF000	/* Secure Control registers */ +#define NOMADIK_MSP2_BASE	0x101F0000	/* MSP 2 interface */ +#define NOMADIK_MSP1_BASE	0x101F1000	/* MSP 1 interface */ +#define NOMADIK_UART2_BASE	0x101F2000	/* UART 2 interface */ +#define NOMADIK_SSIRx_BASE	0x101F3000	/* SSI 8-ch rx interface */ +#define NOMADIK_SSITx_BASE	0x101F4000	/* SSI 8-ch tx interface */ +#define NOMADIK_MSHC_BASE	0x101F5000	/* Memory Stick(Pro) Host */ +#define NOMADIK_SDI_BASE	0x101F6000	/* SD-card/MM-Card */ +#define NOMADIK_I2C1_BASE	0x101F7000	/* I2C1 interface */ +#define NOMADIK_I2C0_BASE	0x101F8000	/* I2C0 interface */ +#define NOMADIK_MSP0_BASE	0x101F9000	/* MSP 0 interface */ +#define NOMADIK_FIRDA_BASE	0x101FA000	/* FIrDA interface */ +#define NOMADIK_UART1_BASE	0x101FB000	/* UART 1 interface */ +#define NOMADIK_SSP_BASE	0x101FC000	/* SSP interface */ +#define NOMADIK_UART0_BASE	0x101FD000	/* UART 0 interface */ +#define NOMADIK_SGA_BASE	0x101FE000	/* SGA interface */ +#define NOMADIK_L2CC_BASE	0x10210000	/* L2 Cache controller */ +#define NOMADIK_UART1_VBASE	0xF01FB000 + +/* This is needed for LL-debug/earlyprintk/debug-macro.S */ +static struct map_desc cpu8815_io_desc[] __initdata = {  	{ -		.name = "GPIO-0-31", -		.first_gpio = 0, -		.first_irq = NOMADIK_GPIO_TO_IRQ(0), -	}, { -		.name = "GPIO-32-63", -		.first_gpio = 32, -		.first_irq = NOMADIK_GPIO_TO_IRQ(32), -	}, { -		.name = "GPIO-64-95", -		.first_gpio = 64, -		.first_irq = NOMADIK_GPIO_TO_IRQ(64), -	}, { -		.name = "GPIO-96-127", /* 124..127 not routed to pin */ -		.first_gpio = 96, -		.first_irq = NOMADIK_GPIO_TO_IRQ(96), -	} -}; - -static struct resource cpu8815_gpio_resources[] = { -	GPIO_RESOURCE(0), -	GPIO_RESOURCE(1), -	GPIO_RESOURCE(2), -	GPIO_RESOURCE(3), -}; - -static struct platform_device cpu8815_platform_gpio[] = { -	GPIO_DEVICE(0), -	GPIO_DEVICE(1), -	GPIO_DEVICE(2), -	GPIO_DEVICE(3), -}; - -static struct amba_device cpu8815_amba_rng = { -	.dev = { -		.init_name = "rng", +		.virtual =	NOMADIK_UART1_VBASE, +		.pfn =		__phys_to_pfn(NOMADIK_UART1_BASE), +		.length =	SZ_4K, +		.type =		MT_DEVICE,  	}, -	__MEM_4K_RESOURCE(NOMADIK_RNG_BASE), -}; - -static struct platform_device *platform_devs[] __initdata = { -	cpu8815_platform_gpio + 0, -	cpu8815_platform_gpio + 1, -	cpu8815_platform_gpio + 2, -	cpu8815_platform_gpio + 3, -}; - -static struct amba_device *amba_devs[] __initdata = { -	&cpu8815_amba_rng  }; -static int __init cpu8815_init(void) +static void __init cpu8815_map_io(void)  { -	int i; - -	platform_add_devices(platform_devs, ARRAY_SIZE(platform_devs)); -	for (i = 0; i < ARRAY_SIZE(amba_devs); i++) -		amba_device_register(amba_devs[i], &iomem_resource); -	return 0; +	iotable_init(cpu8815_io_desc, ARRAY_SIZE(cpu8815_io_desc));  } -arch_initcall(cpu8815_init); - -/* All SoC devices live in the same area (see hardware.h) */ -static struct map_desc nomadik_io_desc[] __initdata = { -	{ -		.virtual =	NOMADIK_IO_VIRTUAL, -		.pfn =		__phys_to_pfn(NOMADIK_IO_PHYSICAL), -		.length =	NOMADIK_IO_SIZE, -		.type = 	MT_DEVICE, -	} -	/* static ram and secured ram may be added later */ -}; -void __init cpu8815_map_io(void) +static void cpu8815_restart(enum reboot_mode mode, const char *cmd)  { -	iotable_init(nomadik_io_desc, ARRAY_SIZE(nomadik_io_desc)); -} +	void __iomem *srcbase = ioremap(NOMADIK_SRC_BASE, SZ_4K); -void __init cpu8815_init_irq(void) -{ -	/* This modified VIC cell has two register blocks, at 0 and 0x20 */ -	vic_init(io_p2v(NOMADIK_IC_BASE + 0x00), IRQ_VIC_START +  0, ~0, 0); -	vic_init(io_p2v(NOMADIK_IC_BASE + 0x20), IRQ_VIC_START + 32, ~0, 0); +	/* FIXME: use egpio when implemented */ -	/* -	 * Init clocks here so that they are available for system timer -	 * initialization. -	 */ -	clk_init(); +	/* Write anything to Reset status register */ +	writel(1, srcbase + 0x18);  }  /* - * This function is called from the board init ("init_machine"). + * This GPIO pin turns on a line that is used to detect card insertion + * on this board.   */ - void __init cpu8815_platform_init(void) +static int __init cpu8815_mmcsd_init(void)  { -#ifdef CONFIG_CACHE_L2X0 -	/* At full speed latency must be >=2, so 0x249 in low bits */ -	l2x0_init(io_p2v(NOMADIK_L2CC_BASE), 0x00730249, 0xfe000fff); -#endif -	 return; +	struct device_node *cdbias; +	int gpio, err; + +	cdbias = of_find_node_by_path("/usb-s8815/mmcsd-gpio"); +	if (!cdbias) { +		pr_info("could not find MMC/SD card detect bias node\n"); +		return 0; +	} +	gpio = of_get_gpio(cdbias, 0); +	if (gpio < 0) { +		pr_info("could not obtain MMC/SD card detect bias GPIO\n"); +		return 0; +	} +	err = gpio_request(gpio, "card detect bias"); +	if (err) { +		pr_info("failed to request card detect bias GPIO %d\n", gpio); +		return -ENODEV; +	} +	err = gpio_direction_output(gpio, 0); +	if (err){ +		pr_info("failed to set GPIO %d as output, low\n", gpio); +		return err; +	} +	pr_info("enabled USB-S8815 CD bias GPIO %d, low\n", gpio); +	return 0;  } +device_initcall(cpu8815_mmcsd_init); + +static const char * cpu8815_board_compat[] = { +	"calaosystems,usb-s8815", +	NULL, +}; + +DT_MACHINE_START(NOMADIK_DT, "Nomadik STn8815") +	/* At full speed latency must be >=2, so 0x249 in low bits */ +	.l2c_aux_val	= 0x00700249, +	.l2c_aux_mask	= 0xfe0fefff, +	.map_io		= cpu8815_map_io, +	.restart	= cpu8815_restart, +	.dt_compat      = cpu8815_board_compat, +MACHINE_END diff --git a/arch/arm/mach-nomadik/i2c-8815nhk.c b/arch/arm/mach-nomadik/i2c-8815nhk.c deleted file mode 100644 index abfe25a08d6..00000000000 --- a/arch/arm/mach-nomadik/i2c-8815nhk.c +++ /dev/null @@ -1,65 +0,0 @@ -#include <linux/module.h> -#include <linux/init.h> -#include <linux/i2c.h> -#include <linux/i2c-algo-bit.h> -#include <linux/i2c-gpio.h> -#include <linux/gpio.h> -#include <linux/platform_device.h> - -/* - * There are two busses in the 8815NHK. - * They could, in theory, be driven by the hardware component, but we - * use bit-bang through GPIO by now, to keep things simple - */ - -static struct i2c_gpio_platform_data nhk8815_i2c_data0 = { -	/* keep defaults for timeouts; pins are push-pull bidirectional */ -	.scl_pin = 62, -	.sda_pin = 63, -}; - -static struct i2c_gpio_platform_data nhk8815_i2c_data1 = { -	/* keep defaults for timeouts; pins are push-pull bidirectional */ -	.scl_pin = 53, -	.sda_pin = 54, -}; - -/* first bus: GPIO XX and YY */ -static struct platform_device nhk8815_i2c_dev0 = { -	.name	= "i2c-gpio", -	.id	= 0, -	.dev	= { -		.platform_data = &nhk8815_i2c_data0, -	}, -}; -/* second bus: GPIO XX and YY */ -static struct platform_device nhk8815_i2c_dev1 = { -	.name	= "i2c-gpio", -	.id	= 1, -	.dev	= { -		.platform_data = &nhk8815_i2c_data1, -	}, -}; - -static int __init nhk8815_i2c_init(void) -{ -	nmk_gpio_set_mode(nhk8815_i2c_data0.scl_pin, NMK_GPIO_ALT_GPIO); -	nmk_gpio_set_mode(nhk8815_i2c_data0.sda_pin, NMK_GPIO_ALT_GPIO); -	platform_device_register(&nhk8815_i2c_dev0); - -	nmk_gpio_set_mode(nhk8815_i2c_data1.scl_pin, NMK_GPIO_ALT_GPIO); -	nmk_gpio_set_mode(nhk8815_i2c_data1.sda_pin, NMK_GPIO_ALT_GPIO); -	platform_device_register(&nhk8815_i2c_dev1); - -	return 0; -} - -static void __exit nhk8815_i2c_exit(void) -{ -	platform_device_unregister(&nhk8815_i2c_dev0); -	platform_device_unregister(&nhk8815_i2c_dev1); -	return; -} - -module_init(nhk8815_i2c_init); -module_exit(nhk8815_i2c_exit); diff --git a/arch/arm/mach-nomadik/include/mach/clkdev.h b/arch/arm/mach-nomadik/include/mach/clkdev.h deleted file mode 100644 index 04b37a89801..00000000000 --- a/arch/arm/mach-nomadik/include/mach/clkdev.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef __ASM_MACH_CLKDEV_H -#define __ASM_MACH_CLKDEV_H - -#define __clk_get(clk) ({ 1; }) -#define __clk_put(clk) do { } while (0) - -#endif diff --git a/arch/arm/mach-nomadik/include/mach/debug-macro.S b/arch/arm/mach-nomadik/include/mach/debug-macro.S deleted file mode 100644 index e7151b4b888..00000000000 --- a/arch/arm/mach-nomadik/include/mach/debug-macro.S +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Debugging macro include header - * - *  Copyright (C) 1994-1999 Russell King - *  Moved from linux/arch/arm/kernel/debug.S by Ben Dooks - * - * 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. - * -*/ - -		.macro	addruart, rp, rv -		mov	\rp, #0x00100000 -		add	\rp, \rp, #0x000fb000 -		add	\rv, \rp, #0xf0000000	@ virtual base -		add	\rp, \rp, #0x10000000	@ physical base address -		.endm - -#include <asm/hardware/debug-pl01x.S> diff --git a/arch/arm/mach-nomadik/include/mach/entry-macro.S b/arch/arm/mach-nomadik/include/mach/entry-macro.S deleted file mode 100644 index 49f1aa3bb42..00000000000 --- a/arch/arm/mach-nomadik/include/mach/entry-macro.S +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Low-level IRQ helper macros for Nomadik platforms - * - * This file is licensed under  the terms of the GNU General Public - * License version 2. This program is licensed "as is" without any - * warranty of any kind, whether express or implied. - */ - -#include <mach/hardware.h> -#include <mach/irqs.h> - -	.macro	disable_fiq -	.endm - -	.macro	get_irqnr_preamble, base, tmp -	ldr	\base, =IO_ADDRESS(NOMADIK_IC_BASE) -	.endm - -	.macro	arch_ret_to_user, tmp1, tmp2 -	.endm - -	.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp - -	/* This stanza gets the irq mask from one of two status registers */ -	mov	\irqnr, #0 -	ldr	\irqstat, [\base, #VIC_REG_IRQSR0]	@ get masked status -	cmp	\irqstat, #0 -	bne	1001f -	add	\irqnr, \irqnr, #32 -	ldr	\irqstat, [\base, #VIC_REG_IRQSR1]	@ get masked status - -1001:	tst	\irqstat, #15 -	bne	1002f -	add	\irqnr, \irqnr, #4 -	movs	\irqstat, \irqstat, lsr #4 -	bne	1001b -1002:	tst	\irqstat, #1 -	bne	1003f -	add	\irqnr, \irqnr, #1 -	movs	\irqstat, \irqstat, lsr #1 -	bne	1002b -1003:	/* EQ will be set if no irqs pending */ -	.endm diff --git a/arch/arm/mach-nomadik/include/mach/fsmc.h b/arch/arm/mach-nomadik/include/mach/fsmc.h deleted file mode 100644 index 8c2c0518368..00000000000 --- a/arch/arm/mach-nomadik/include/mach/fsmc.h +++ /dev/null @@ -1,29 +0,0 @@ - -/* Definitions for the Nomadik FSMC "Flexible Static Memory controller" */ - -#ifndef __ASM_ARCH_FSMC_H -#define __ASM_ARCH_FSMC_H - -#include <mach/hardware.h> -/* - * Register list - */ - -/* bus control reg. and bus timing reg. for CS0..CS3 */ -#define FSMC_BCR(x)     (NOMADIK_FSMC_VA + (x << 3)) -#define FSMC_BTR(x)     (NOMADIK_FSMC_VA + (x << 3) + 0x04) - -/* PC-card and NAND: - * PCR = control register - * PMEM = memory timing - * PATT = attribute timing - * PIO = I/O timing - * PECCR = ECC result - */ -#define FSMC_PCR(x)     (NOMADIK_FSMC_VA + ((2 + x) << 5) + 0x00) -#define FSMC_PMEM(x)    (NOMADIK_FSMC_VA + ((2 + x) << 5) + 0x08) -#define FSMC_PATT(x)    (NOMADIK_FSMC_VA + ((2 + x) << 5) + 0x0c) -#define FSMC_PIO(x)     (NOMADIK_FSMC_VA + ((2 + x) << 5) + 0x10) -#define FSMC_PECCR(x)   (NOMADIK_FSMC_VA + ((2 + x) << 5) + 0x14) - -#endif /* __ASM_ARCH_FSMC_H */ diff --git a/arch/arm/mach-nomadik/include/mach/gpio.h b/arch/arm/mach-nomadik/include/mach/gpio.h deleted file mode 100644 index 7a81a042034..00000000000 --- a/arch/arm/mach-nomadik/include/mach/gpio.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef __ASM_ARCH_GPIO_H -#define __ASM_ARCH_GPIO_H - -#include <plat/gpio.h> - -#endif /* __ASM_ARCH_GPIO_H */ diff --git a/arch/arm/mach-nomadik/include/mach/hardware.h b/arch/arm/mach-nomadik/include/mach/hardware.h deleted file mode 100644 index 6316dba3bfc..00000000000 --- a/arch/arm/mach-nomadik/include/mach/hardware.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * This file contains the hardware definitions of the Nomadik. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the - * GNU General Public License for more details. - * - * YOU should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA - */ -#ifndef __ASM_ARCH_HARDWARE_H -#define __ASM_ARCH_HARDWARE_H - -/* Nomadik registers live from 0x1000.0000 to 0x1023.0000 -- currently */ -#define NOMADIK_IO_VIRTUAL	0xF0000000	/* VA of IO  */ -#define NOMADIK_IO_PHYSICAL	0x10000000	/* PA of IO */ -#define NOMADIK_IO_SIZE		0x00300000	/* 3MB for all regs */ - -/* used in C code, so cast to proper type */ -#define io_p2v(x) ((void __iomem *)(x) \ -			- NOMADIK_IO_PHYSICAL + NOMADIK_IO_VIRTUAL) -#define io_v2p(x) ((unsigned long)(x) \ -			- NOMADIK_IO_VIRTUAL + NOMADIK_IO_PHYSICAL) - -/* used in asm code, so no casts */ -#define IO_ADDRESS(x) ((x) - NOMADIK_IO_PHYSICAL + NOMADIK_IO_VIRTUAL) - -/* - *   Base address defination for Nomadik Onchip Logic Block - */ -#define NOMADIK_FSMC_BASE	0x10100000	/* FSMC registers */ -#define NOMADIK_SDRAMC_BASE	0x10110000	/* SDRAM Controller */ -#define NOMADIK_CLCDC_BASE	0x10120000	/* CLCD Controller */ -#define NOMADIK_MDIF_BASE	0x10120000	/* MDIF */ -#define NOMADIK_DMA0_BASE	0x10130000	/* DMA0 Controller */ -#define NOMADIK_IC_BASE		0x10140000	/* Vectored Irq Controller */ -#define NOMADIK_DMA1_BASE	0x10150000	/* DMA1 Controller */ -#define NOMADIK_USB_BASE	0x10170000	/* USB-OTG conf reg base */ -#define NOMADIK_CRYP_BASE	0x10180000	/* Crypto processor */ -#define NOMADIK_SHA1_BASE	0x10190000	/* SHA-1 Processor */ -#define NOMADIK_XTI_BASE	0x101A0000	/* XTI */ -#define NOMADIK_RNG_BASE	0x101B0000	/* Random number generator */ -#define NOMADIK_SRC_BASE	0x101E0000	/* SRC base */ -#define NOMADIK_WDOG_BASE	0x101E1000	/* Watchdog */ -#define NOMADIK_MTU0_BASE	0x101E2000	/* Multiple Timer 0 */ -#define NOMADIK_MTU1_BASE	0x101E3000	/* Multiple Timer 1 */ -#define NOMADIK_GPIO0_BASE	0x101E4000	/* GPIO0 */ -#define NOMADIK_GPIO1_BASE	0x101E5000	/* GPIO1 */ -#define NOMADIK_GPIO2_BASE	0x101E6000	/* GPIO2 */ -#define NOMADIK_GPIO3_BASE	0x101E7000	/* GPIO3 */ -#define NOMADIK_RTC_BASE	0x101E8000	/* Real Time Clock base */ -#define NOMADIK_PMU_BASE	0x101E9000	/* Power Management Unit */ -#define NOMADIK_OWM_BASE	0x101EA000	/* One wire master */ -#define NOMADIK_SCR_BASE	0x101EF000	/* Secure Control registers */ -#define NOMADIK_MSP2_BASE	0x101F0000	/* MSP 2 interface */ -#define NOMADIK_MSP1_BASE	0x101F1000	/* MSP 1 interface */ -#define NOMADIK_UART2_BASE	0x101F2000	/* UART 2 interface */ -#define NOMADIK_SSIRx_BASE	0x101F3000	/* SSI 8-ch rx interface */ -#define NOMADIK_SSITx_BASE	0x101F4000	/* SSI 8-ch tx interface */ -#define NOMADIK_MSHC_BASE	0x101F5000	/* Memory Stick(Pro) Host */ -#define NOMADIK_SDI_BASE	0x101F6000	/* SD-card/MM-Card */ -#define NOMADIK_I2C1_BASE	0x101F7000	/* I2C1 interface */ -#define NOMADIK_I2C0_BASE	0x101F8000	/* I2C0 interface */ -#define NOMADIK_MSP0_BASE	0x101F9000	/* MSP 0 interface  */ -#define NOMADIK_FIRDA_BASE	0x101FA000	/* FIrDA interface  */ -#define NOMADIK_UART1_BASE	0x101FB000	/* UART 1 interface */ -#define NOMADIK_SSP_BASE	0x101FC000	/* SSP interface  */ -#define NOMADIK_UART0_BASE	0x101FD000	/* UART 0 interface */ -#define NOMADIK_SGA_BASE	0x101FE000	/* SGA interface */ -#define NOMADIK_L2CC_BASE	0x10210000	/* L2 Cache controller */ - -/* Other ranges, not for p2v/v2p */ -#define NOMADIK_BACKUP_RAM	0x80010000 -#define NOMADIK_EBROM		0x80000000	/* Embedded boot ROM */ -#define NOMADIK_HAMACV_DMEM_BASE 0xA0100000	/* HAMACV Data Memory Start */ -#define NOMADIK_HAMACV_DMEM_END	0xA01FFFFF	/* HAMACV Data Memory End */ -#define NOMADIK_HAMACA_DMEM	0xA0200000	/* HAMACA Data Memory Space */ - -#define NOMADIK_FSMC_VA		IO_ADDRESS(NOMADIK_FSMC_BASE) -#define NOMADIK_MTU0_VA		IO_ADDRESS(NOMADIK_MTU0_BASE) -#define NOMADIK_MTU1_VA		IO_ADDRESS(NOMADIK_MTU1_BASE) - -#endif /* __ASM_ARCH_HARDWARE_H */ diff --git a/arch/arm/mach-nomadik/include/mach/io.h b/arch/arm/mach-nomadik/include/mach/io.h deleted file mode 100644 index 2e1eca1b824..00000000000 --- a/arch/arm/mach-nomadik/include/mach/io.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * arch/arm/mach-nomadik/include/mach/io.h   (copied from mach-sa1100) - * - * Copyright (C) 1997-1999 Russell King - * - * Modifications: - *  06-12-1997  RMK     Created. - *  07-04-1999  RMK     Major cleanup - */ -#ifndef __ASM_ARM_ARCH_IO_H -#define __ASM_ARM_ARCH_IO_H - -#define IO_SPACE_LIMIT 0xffffffff - -/* - * We don't actually have real ISA nor PCI buses, but there is so many - * drivers out there that might just work if we fake them... - */ -#define __io(a)         __typesafe_io(a) -#define __mem_pci(a)    (a) - -#endif diff --git a/arch/arm/mach-nomadik/include/mach/irqs.h b/arch/arm/mach-nomadik/include/mach/irqs.h deleted file mode 100644 index 8faabc56039..00000000000 --- a/arch/arm/mach-nomadik/include/mach/irqs.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - *  mach-nomadik/include/mach/irqs.h - * - *  Copyright (C) ST Microelectronics - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA - */ -#ifndef __ASM_ARCH_IRQS_H -#define __ASM_ARCH_IRQS_H - -#include <mach/hardware.h> - -#define IRQ_VIC_START		0	/* first VIC interrupt is 0 */ - -/* - * Interrupt numbers generic for all Nomadik Chip cuts - */ -#define IRQ_WATCHDOG			0 -#define IRQ_SOFTINT			1 -#define IRQ_CRYPTO			2 -#define IRQ_OWM				3 -#define IRQ_MTU0			4 -#define IRQ_MTU1			5 -#define IRQ_GPIO0			6 -#define IRQ_GPIO1			7 -#define IRQ_GPIO2			8 -#define IRQ_GPIO3			9 -#define IRQ_RTC_RTT			10 -#define IRQ_SSP				11 -#define IRQ_UART0			12 -#define IRQ_DMA1			13 -#define IRQ_CLCD_MDIF			14 -#define IRQ_DMA0			15 -#define IRQ_PWRFAIL			16 -#define IRQ_UART1			17 -#define IRQ_FIRDA			18 -#define IRQ_MSP0			19 -#define IRQ_I2C0			20 -#define IRQ_I2C1			21 -#define IRQ_SDMMC			22 -#define IRQ_USBOTG			23 -#define IRQ_SVA_IT0			24 -#define IRQ_SVA_IT1			25 -#define IRQ_SAA_IT0			26 -#define IRQ_SAA_IT1			27 -#define IRQ_UART2			28 -#define IRQ_MSP2			31 -#define IRQ_L2CC			48 -#define IRQ_HPI				49 -#define IRQ_SKE				50 -#define IRQ_KP				51 -#define IRQ_MEMST			54 -#define IRQ_SGA_IT			58 -#define IRQ_USBM			60 -#define IRQ_MSP1			62 - -#define NOMADIK_SOC_NR_IRQS		64 - -/* After chip-specific IRQ numbers we have the GPIO ones */ -#define NOMADIK_NR_GPIO			128 /* last 4 not wired to pins */ -#define NOMADIK_GPIO_TO_IRQ(gpio)	((gpio) + NOMADIK_SOC_NR_IRQS) -#define NOMADIK_IRQ_TO_GPIO(irq)	((irq) - NOMADIK_SOC_NR_IRQS) -#define NR_IRQS				NOMADIK_GPIO_TO_IRQ(NOMADIK_NR_GPIO) - -/* Following two are used by entry_macro.S, to access our dual-vic */ -#define VIC_REG_IRQSR0		0 -#define VIC_REG_IRQSR1		0x20 - -#endif /* __ASM_ARCH_IRQS_H */ - diff --git a/arch/arm/mach-nomadik/include/mach/memory.h b/arch/arm/mach-nomadik/include/mach/memory.h deleted file mode 100644 index 1e5689d98ec..00000000000 --- a/arch/arm/mach-nomadik/include/mach/memory.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - *  mach-nomadik/include/mach/memory.h - * - *  Copyright (C) 1999 ARM Limited - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA - */ -#ifndef __ASM_ARCH_MEMORY_H -#define __ASM_ARCH_MEMORY_H - -/* - * Physical DRAM offset. - */ -#define PHYS_OFFSET	UL(0x00000000) - -#endif diff --git a/arch/arm/mach-nomadik/include/mach/nand.h b/arch/arm/mach-nomadik/include/mach/nand.h deleted file mode 100644 index c3c8254c22a..00000000000 --- a/arch/arm/mach-nomadik/include/mach/nand.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef __ASM_ARCH_NAND_H -#define __ASM_ARCH_NAND_H - -struct nomadik_nand_platform_data { -	struct mtd_partition *parts; -	int nparts; -	int options; -	int (*init) (void); -	int (*exit) (void); -}; - -#define NAND_IO_DATA	0x40000000 -#define NAND_IO_CMD	0x40800000 -#define NAND_IO_ADDR	0x41000000 - -#endif				/* __ASM_ARCH_NAND_H */ diff --git a/arch/arm/mach-nomadik/include/mach/setup.h b/arch/arm/mach-nomadik/include/mach/setup.h deleted file mode 100644 index b7897edf1f3..00000000000 --- a/arch/arm/mach-nomadik/include/mach/setup.h +++ /dev/null @@ -1,22 +0,0 @@ - -/* - * These symbols are needed for board-specific files to call their - * own cpu-specific files - */ - -#ifndef __ASM_ARCH_SETUP_H -#define __ASM_ARCH_SETUP_H - -#include <asm/mach/time.h> -#include <linux/init.h> - -#ifdef CONFIG_NOMADIK_8815 - -extern void cpu8815_map_io(void); -extern void cpu8815_platform_init(void); -extern void cpu8815_init_irq(void); -extern void nmdk_timer_init(void); - -#endif /* NOMADIK_8815 */ - -#endif /*  __ASM_ARCH_SETUP_H */ diff --git a/arch/arm/mach-nomadik/include/mach/system.h b/arch/arm/mach-nomadik/include/mach/system.h deleted file mode 100644 index 7119f688116..00000000000 --- a/arch/arm/mach-nomadik/include/mach/system.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - *  mach-nomadik/include/mach/system.h - * - *  Copyright (C) 2008 STMicroelectronics - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA - */ -#ifndef __ASM_ARCH_SYSTEM_H -#define __ASM_ARCH_SYSTEM_H - -#include <linux/io.h> -#include <mach/hardware.h> - -static inline void arch_idle(void) -{ -	/* -	 * This should do all the clock switching -	 * and wait for interrupt tricks -	 */ -	cpu_do_idle(); -} - -static inline void arch_reset(char mode, const char *cmd) -{ -	void __iomem *src_rstsr = io_p2v(NOMADIK_SRC_BASE + 0x18); - -	/* FIXME: use egpio when implemented */ - -	/* Write anything to Reset status register */ -	writel(1, src_rstsr); -} - -#endif diff --git a/arch/arm/mach-nomadik/include/mach/timex.h b/arch/arm/mach-nomadik/include/mach/timex.h deleted file mode 100644 index 318b8896ce9..00000000000 --- a/arch/arm/mach-nomadik/include/mach/timex.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef __ASM_ARCH_TIMEX_H -#define __ASM_ARCH_TIMEX_H - -#define CLOCK_TICK_RATE         2400000 - -#endif diff --git a/arch/arm/mach-nomadik/include/mach/uncompress.h b/arch/arm/mach-nomadik/include/mach/uncompress.h deleted file mode 100644 index 071003bc845..00000000000 --- a/arch/arm/mach-nomadik/include/mach/uncompress.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - *  Copyright (C) 2008 STMicroelectronics - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA - */ - -#ifndef __ASM_ARCH_UNCOMPRESS_H -#define __ASM_ARCH_UNCOMPRESS_H - -#include <asm/setup.h> -#include <asm/io.h> -#include <mach/hardware.h> - -/* we need the constants in amba/serial.h, but it refers to amba_device */ -struct amba_device; -#include <linux/amba/serial.h> - -#define NOMADIK_UART_DR		0x101FB000 -#define NOMADIK_UART_LCRH	0x101FB02c -#define NOMADIK_UART_CR		0x101FB030 -#define NOMADIK_UART_FR		0x101FB018 - -static void putc(const char c) -{ -	/* Do nothing if the UART is not enabled. */ -	if (!(readb(NOMADIK_UART_CR) & UART01x_CR_UARTEN)) -		return; - -	if (c == '\n') -		putc('\r'); - -	while (readb(NOMADIK_UART_FR) & UART01x_FR_TXFF) -		barrier(); -	writeb(c, NOMADIK_UART_DR); -} - -static void flush(void) -{ -	if (!(readb(NOMADIK_UART_CR) & UART01x_CR_UARTEN)) -		return; -	while (readb(NOMADIK_UART_FR) & UART01x_FR_BUSY) -		barrier(); -} - -static inline void arch_decomp_setup(void) -{ -} - -#define arch_decomp_wdog() /* nothing to do here */ - -#endif /* __ASM_ARCH_UNCOMPRESS_H */ diff --git a/arch/arm/mach-nomadik/include/mach/vmalloc.h b/arch/arm/mach-nomadik/include/mach/vmalloc.h deleted file mode 100644 index f83d574d944..00000000000 --- a/arch/arm/mach-nomadik/include/mach/vmalloc.h +++ /dev/null @@ -1,2 +0,0 @@ - -#define VMALLOC_END       0xe8000000UL  | 
