Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6be62ba2 authored by Catalin Marinas's avatar Catalin Marinas Committed by Russell King
Browse files

[ARM] 5396/1: RealView: Use PATA_PLATFORM to access the CompactFlash



This driver adds the platform_device definitions to allow the use of
CompactFlash on the RealView PB11MPCore and PB-A8 platforms. Note that
the CompactFlash controller is expected to be initialised by the Boot
Monitor and support the True IDE mode.

Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 533ad5e6
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@ config MACH_REALVIEW_PB11MP
	bool "Support RealView/PB11MPCore platform"
	select CPU_V6
	select ARM_GIC
	select HAVE_PATA_PLATFORM
	help
	  Include support for the ARM(R) RealView MPCore Platform Baseboard.
	  PB11MPCore is a platform with an on-board ARM11MPCore and has
@@ -51,6 +52,7 @@ config MACH_REALVIEW_PBA8
	bool "Support RealView/PB-A8 platform"
	select CPU_V7
	select ARM_GIC
	select HAVE_PATA_PLATFORM
	help
	  Include support for the ARM(R) RealView Cortex-A8 Platform Baseboard.
	  PB-A8 is a platform with an on-board Cortex-A8 and has support for
+28 −0
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@
#include <linux/clockchips.h>
#include <linux/io.h>
#include <linux/smc911x.h>
#include <linux/ata_platform.h>

#include <asm/clkdev.h>
#include <asm/system.h>
@@ -150,6 +151,33 @@ int realview_eth_register(const char *name, struct resource *res)
	return platform_device_register(&realview_eth_device);
}

static struct pata_platform_info pata_platform_data = {
	.ioport_shift		= 1,
};

static struct resource pata_resources[] = {
	[0] = {
		.start		= REALVIEW_CF_BASE,
		.end		= REALVIEW_CF_BASE + 0xff,
		.flags		= IORESOURCE_MEM,
	},
	[1] = {
		.start		= REALVIEW_CF_BASE + 0x100,
		.end		= REALVIEW_CF_BASE + SZ_4K - 1,
		.flags		= IORESOURCE_MEM,
	},
};

struct platform_device realview_cf_device = {
	.name			= "pata_platform",
	.id			= -1,
	.num_resources		= ARRAY_SIZE(pata_resources),
	.resource		= pata_resources,
	.dev			= {
		.platform_data	= &pata_platform_data,
	},
};

static struct resource realview_i2c_resource = {
	.start		= REALVIEW_I2C_BASE,
	.end		= REALVIEW_I2C_BASE + SZ_4K - 1,
+1 −0
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ static struct amba_device name##_device = { \
}

extern struct platform_device realview_flash_device;
extern struct platform_device realview_cf_device;
extern struct platform_device realview_i2c_device;
extern struct mmc_platform_data realview_mmc0_plat_data;
extern struct mmc_platform_data realview_mmc1_plat_data;
+0 −2
Original line number Diff line number Diff line
@@ -45,8 +45,6 @@
#define REALVIEW_PBA8_DMC_BASE			0x100E0000	/* DMC configuration */
#define REALVIEW_PBA8_SMC_BASE			0x100E1000	/* SMC configuration */
#define REALVIEW_PBA8_CAN_BASE			0x100E2000	/* CAN bus */
#define REALVIEW_PBA8_CF_BASE			0x18000000	/* Compact flash */
#define REALVIEW_PBA8_CF_MEM_BASE		0x18003000	/* SMC for Compact flash */
#define REALVIEW_PBA8_GIC_CPU_BASE		0x1E000000	/* Generic interrupt controller CPU interface */
#define REALVIEW_PBA8_FLASH0_BASE		0x40000000
#define REALVIEW_PBA8_FLASH0_SIZE		SZ_64M
+6 −0
Original line number Diff line number Diff line
@@ -203,6 +203,12 @@
#define REALVIEW_SDRAM67_BASE         0x70000000	/* SDRAM banks 6 and 7 */
#define REALVIEW_LT_BASE              0x80000000	/* Logic Tile expansion */

/*
 * CompactFlash
 */
#define REALVIEW_CF_BASE		0x18000000	/* CompactFlash */
#define REALVIEW_CF_MEM_BASE		0x18003000	/* SMC for CompactFlash */

/*
 * Disk on Chip
 */
Loading