Commit 2123b16b authored by Olof Johansson's avatar Olof Johansson

Merge branch 'ux500/devel' into next/devel

* ux500/devel:
  ARM: ux500: fix the smp_twd clock calculation
  ARM: ux500: remove support for early silicon revisions
  ARM: ux500: update register files
  ARM: ux500: register DB5500 PMU dynamically
  ARM: ux500: update ASIC detection for U5500
  ARM: ux500: support DB8520
parents 4b3ee30b 10958434
...@@ -21,6 +21,12 @@ ...@@ -21,6 +21,12 @@
#include "board-mop500.h" #include "board-mop500.h"
#include "ste-dma40-db8500.h" #include "ste-dma40-db8500.h"
/*
* v2 has a new version of this block that need to be forced, the number found
* in hardware is incorrect
*/
#define U8500_SDI_V2_PERIPHID 0x10480180
/* /*
* SDI 0 (MicroSD slot) * SDI 0 (MicroSD slot)
*/ */
...@@ -117,10 +123,7 @@ static void sdi0_configure(void) ...@@ -117,10 +123,7 @@ static void sdi0_configure(void)
gpio_direction_output(sdi0_en, 1); gpio_direction_output(sdi0_en, 1);
/* Add the device, force v2 to subrevision 1 */ /* Add the device, force v2 to subrevision 1 */
if (cpu_is_u8500v2()) db8500_add_sdi0(&mop500_sdi0_data, U8500_SDI_V2_PERIPHID);
db8500_add_sdi0(&mop500_sdi0_data, 0x10480180);
else
db8500_add_sdi0(&mop500_sdi0_data, 0);
} }
void mop500_sdi_tc35892_init(void) void mop500_sdi_tc35892_init(void)
...@@ -194,7 +197,8 @@ static struct stedma40_chan_cfg mop500_sdi2_dma_cfg_tx = { ...@@ -194,7 +197,8 @@ static struct stedma40_chan_cfg mop500_sdi2_dma_cfg_tx = {
static struct mmci_platform_data mop500_sdi2_data = { static struct mmci_platform_data mop500_sdi2_data = {
.ocr_mask = MMC_VDD_165_195, .ocr_mask = MMC_VDD_165_195,
.f_max = 50000000, .f_max = 50000000,
.capabilities = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, .capabilities = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA |
MMC_CAP_MMC_HIGHSPEED,
.gpio_cd = -1, .gpio_cd = -1,
.gpio_wp = -1, .gpio_wp = -1,
#ifdef CONFIG_STE_DMA40 #ifdef CONFIG_STE_DMA40
...@@ -244,20 +248,10 @@ static struct mmci_platform_data mop500_sdi4_data = { ...@@ -244,20 +248,10 @@ static struct mmci_platform_data mop500_sdi4_data = {
void __init mop500_sdi_init(void) void __init mop500_sdi_init(void)
{ {
u32 periphid = 0; /* PoP:ed eMMC */
db8500_add_sdi2(&mop500_sdi2_data, U8500_SDI_V2_PERIPHID);
/* v2 has a new version of this block that need to be forced */
if (cpu_is_u8500v2())
periphid = 0x10480180;
/* PoP:ed eMMC on top of DB8500 v1.0 has problems with high speed */
if (!cpu_is_u8500v10())
mop500_sdi2_data.capabilities |= MMC_CAP_MMC_HIGHSPEED;
db8500_add_sdi2(&mop500_sdi2_data, periphid);
/* On-board eMMC */ /* On-board eMMC */
db8500_add_sdi4(&mop500_sdi4_data, periphid); db8500_add_sdi4(&mop500_sdi4_data, U8500_SDI_V2_PERIPHID);
/* /*
* On boards with the TC35892 GPIO expander, sdi0 will finally * On boards with the TC35892 GPIO expander, sdi0 will finally
* be added when the TC35892 initializes and calls * be added when the TC35892 initializes and calls
...@@ -267,13 +261,9 @@ void __init mop500_sdi_init(void) ...@@ -267,13 +261,9 @@ void __init mop500_sdi_init(void)
void __init snowball_sdi_init(void) void __init snowball_sdi_init(void)
{ {
u32 periphid = 0x10480180;
mop500_sdi2_data.capabilities |= MMC_CAP_MMC_HIGHSPEED;
/* On-board eMMC */ /* On-board eMMC */
db8500_add_sdi4(&mop500_sdi4_data, periphid); db8500_add_sdi4(&mop500_sdi4_data, U8500_SDI_V2_PERIPHID);
/* External Micro SD slot */
mop500_sdi0_data.gpio_cd = SNOWBALL_SDMMC_CD_GPIO; mop500_sdi0_data.gpio_cd = SNOWBALL_SDMMC_CD_GPIO;
mop500_sdi0_data.cd_invert = true; mop500_sdi0_data.cd_invert = true;
sdi0_en = SNOWBALL_SDMMC_EN_GPIO; sdi0_en = SNOWBALL_SDMMC_EN_GPIO;
...@@ -283,19 +273,15 @@ void __init snowball_sdi_init(void) ...@@ -283,19 +273,15 @@ void __init snowball_sdi_init(void)
void __init hrefv60_sdi_init(void) void __init hrefv60_sdi_init(void)
{ {
u32 periphid = 0x10480180; /* PoP:ed eMMC */
db8500_add_sdi2(&mop500_sdi2_data, U8500_SDI_V2_PERIPHID);
mop500_sdi2_data.capabilities |= MMC_CAP_MMC_HIGHSPEED;
db8500_add_sdi2(&mop500_sdi2_data, periphid);
/* On-board eMMC */ /* On-board eMMC */
db8500_add_sdi4(&mop500_sdi4_data, periphid); db8500_add_sdi4(&mop500_sdi4_data, U8500_SDI_V2_PERIPHID);
/* External Micro SD slot */
mop500_sdi0_data.gpio_cd = HREFV60_SDMMC_CD_GPIO; mop500_sdi0_data.gpio_cd = HREFV60_SDMMC_CD_GPIO;
sdi0_en = HREFV60_SDMMC_EN_GPIO; sdi0_en = HREFV60_SDMMC_EN_GPIO;
sdi0_vsel = HREFV60_SDMMC_1V8_3V_GPIO; sdi0_vsel = HREFV60_SDMMC_1V8_3V_GPIO;
sdi0_configure(); sdi0_configure();
/* WLAN SDIO channel */
db8500_add_sdi1(&mop500_sdi1_data, periphid); db8500_add_sdi1(&mop500_sdi1_data, U8500_SDI_V2_PERIPHID);
} }
This diff is collapsed.
...@@ -47,26 +47,6 @@ static struct map_desc u5500_io_desc[] __initdata = { ...@@ -47,26 +47,6 @@ static struct map_desc u5500_io_desc[] __initdata = {
__IO_DEV_DESC(U5500_PRCMU_TCDM_BASE, SZ_4K), __IO_DEV_DESC(U5500_PRCMU_TCDM_BASE, SZ_4K),
}; };
static struct resource db5500_pmu_resources[] = {
[0] = {
.start = IRQ_DB5500_PMU0,
.end = IRQ_DB5500_PMU0,
.flags = IORESOURCE_IRQ,
},
[1] = {
.start = IRQ_DB5500_PMU1,
.end = IRQ_DB5500_PMU1,
.flags = IORESOURCE_IRQ,
},
};
static struct platform_device db5500_pmu_device = {
.name = "arm-pmu",
.id = ARM_PMU_DEVICE_CPU,
.num_resources = ARRAY_SIZE(db5500_pmu_resources),
.resource = db5500_pmu_resources,
};
static struct resource mbox0_resources[] = { static struct resource mbox0_resources[] = {
{ {
.name = "mbox_peer", .name = "mbox_peer",
...@@ -152,7 +132,6 @@ static struct platform_device mbox2_device = { ...@@ -152,7 +132,6 @@ static struct platform_device mbox2_device = {
}; };
static struct platform_device *db5500_platform_devs[] __initdata = { static struct platform_device *db5500_platform_devs[] __initdata = {
&db5500_pmu_device,
&mbox0_device, &mbox0_device,
&mbox1_device, &mbox1_device,
&mbox2_device, &mbox2_device,
...@@ -193,6 +172,25 @@ void __init u5500_map_io(void) ...@@ -193,6 +172,25 @@ void __init u5500_map_io(void)
_PRCMU_BASE = __io_address(U5500_PRCMU_BASE); _PRCMU_BASE = __io_address(U5500_PRCMU_BASE);
} }
static void __init db5500_pmu_init(void)
{
struct resource res[] = {
[0] = {
.start = IRQ_DB5500_PMU0,
.end = IRQ_DB5500_PMU0,
.flags = IORESOURCE_IRQ,
},
[1] = {
.start = IRQ_DB5500_PMU1,
.end = IRQ_DB5500_PMU1,
.flags = IORESOURCE_IRQ,
},
};
platform_device_register_simple("arm-pmu", ARM_PMU_DEVICE_CPU,
res, ARRAY_SIZE(res));
}
static int usb_db5500_rx_dma_cfg[] = { static int usb_db5500_rx_dma_cfg[] = {
DB5500_DMA_DEV4_USB_OTG_IEP_1_9, DB5500_DMA_DEV4_USB_OTG_IEP_1_9,
DB5500_DMA_DEV5_USB_OTG_IEP_2_10, DB5500_DMA_DEV5_USB_OTG_IEP_2_10,
...@@ -218,6 +216,7 @@ static int usb_db5500_tx_dma_cfg[] = { ...@@ -218,6 +216,7 @@ static int usb_db5500_tx_dma_cfg[] = {
void __init u5500_init_devices(void) void __init u5500_init_devices(void)
{ {
db5500_add_gpios(); db5500_add_gpios();
db5500_pmu_init();
db5500_dma_init(); db5500_dma_init();
db5500_add_rtc(); db5500_add_rtc();
db5500_add_usb(usb_db5500_rx_dma_cfg, usb_db5500_tx_dma_cfg); db5500_add_usb(usb_db5500_rx_dma_cfg, usb_db5500_tx_dma_cfg);
......
/* /*
* Copyright (C) 2008-2009 ST-Ericsson * Copyright (C) 2008-2009 ST-Ericsson SA
* *
* Author: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com> * Author: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
* *
...@@ -54,19 +54,6 @@ static struct map_desc u8500_io_desc[] __initdata = { ...@@ -54,19 +54,6 @@ static struct map_desc u8500_io_desc[] __initdata = {
__IO_DEV_DESC(U8500_GPIO1_BASE, SZ_4K), __IO_DEV_DESC(U8500_GPIO1_BASE, SZ_4K),
__IO_DEV_DESC(U8500_GPIO2_BASE, SZ_4K), __IO_DEV_DESC(U8500_GPIO2_BASE, SZ_4K),
__IO_DEV_DESC(U8500_GPIO3_BASE, SZ_4K), __IO_DEV_DESC(U8500_GPIO3_BASE, SZ_4K),
};
static struct map_desc u8500_ed_io_desc[] __initdata = {
__IO_DEV_DESC(U8500_MTU0_BASE_ED, SZ_4K),
__IO_DEV_DESC(U8500_CLKRST7_BASE_ED, SZ_8K),
};
static struct map_desc u8500_v1_io_desc[] __initdata = {
__IO_DEV_DESC(U8500_MTU0_BASE, SZ_4K),
__IO_DEV_DESC(U8500_PRCMU_TCDM_BASE_V1, SZ_4K),
};
static struct map_desc u8500_v2_io_desc[] __initdata = {
__IO_DEV_DESC(U8500_PRCMU_TCDM_BASE, SZ_4K), __IO_DEV_DESC(U8500_PRCMU_TCDM_BASE, SZ_4K),
}; };
...@@ -81,13 +68,6 @@ void __init u8500_map_io(void) ...@@ -81,13 +68,6 @@ void __init u8500_map_io(void)
iotable_init(u8500_io_desc, ARRAY_SIZE(u8500_io_desc)); iotable_init(u8500_io_desc, ARRAY_SIZE(u8500_io_desc));
if (cpu_is_u8500ed())
iotable_init(u8500_ed_io_desc, ARRAY_SIZE(u8500_ed_io_desc));
else if (cpu_is_u8500v1())
iotable_init(u8500_v1_io_desc, ARRAY_SIZE(u8500_v1_io_desc));
else if (cpu_is_u8500v2())
iotable_init(u8500_v2_io_desc, ARRAY_SIZE(u8500_v2_io_desc));
_PRCMU_BASE = __io_address(U8500_PRCMU_BASE); _PRCMU_BASE = __io_address(U8500_PRCMU_BASE);
} }
...@@ -156,12 +136,9 @@ static resource_size_t __initdata db8500_gpio_base[] = { ...@@ -156,12 +136,9 @@ static resource_size_t __initdata db8500_gpio_base[] = {
static void __init db8500_add_gpios(void) static void __init db8500_add_gpios(void)
{ {
struct nmk_gpio_platform_data pdata = { struct nmk_gpio_platform_data pdata = {
/* No custom data yet */ .supports_sleepmode = true,
}; };
if (cpu_is_u8500v2())
pdata.supports_sleepmode = true;
dbx500_add_gpios(ARRAY_AND_SIZE(db8500_gpio_base), dbx500_add_gpios(ARRAY_AND_SIZE(db8500_gpio_base),
IRQ_DB8500_GPIO0, &pdata); IRQ_DB8500_GPIO0, &pdata);
} }
...@@ -193,9 +170,6 @@ static int usb_db8500_tx_dma_cfg[] = { ...@@ -193,9 +170,6 @@ static int usb_db8500_tx_dma_cfg[] = {
*/ */
void __init u8500_init_devices(void) void __init u8500_init_devices(void)
{ {
if (cpu_is_u8500ed())
dma40_u8500ed_fixup();
db8500_add_rtc(); db8500_add_rtc();
db8500_add_gpios(); db8500_add_gpios();
db8500_add_usb(usb_db8500_rx_dma_cfg, usb_db8500_tx_dma_cfg); db8500_add_usb(usb_db8500_rx_dma_cfg, usb_db8500_tx_dma_cfg);
......
...@@ -166,16 +166,6 @@ struct platform_device u8500_dma40_device = { ...@@ -166,16 +166,6 @@ struct platform_device u8500_dma40_device = {
.resource = dma40_resources .resource = dma40_resources
}; };
void dma40_u8500ed_fixup(void)
{
dma40_plat_data.memcpy = NULL;
dma40_plat_data.memcpy_len = 0;
dma40_resources[0].start = U8500_DMA_BASE_ED;
dma40_resources[0].end = U8500_DMA_BASE_ED + SZ_4K - 1;
dma40_resources[1].start = U8500_DMA_LCPA_BASE_ED;
dma40_resources[1].end = U8500_DMA_LCPA_BASE_ED + 2 * SZ_1K - 1;
}
struct resource keypad_resources[] = { struct resource keypad_resources[] = {
[0] = { [0] = {
.start = U8500_SKE_BASE, .start = U8500_SKE_BASE,
......
...@@ -65,6 +65,7 @@ static unsigned int partnumber(unsigned int asicid) ...@@ -65,6 +65,7 @@ static unsigned int partnumber(unsigned int asicid)
* DB8500v1 0x411fc091 0x9001FFF4 0x008500A0 * DB8500v1 0x411fc091 0x9001FFF4 0x008500A0
* DB8500v1.1 0x411fc091 0x9001FFF4 0x008500A1 * DB8500v1.1 0x411fc091 0x9001FFF4 0x008500A1
* DB8500v2 0x412fc091 0x9001DBF4 0x008500B0 * DB8500v2 0x412fc091 0x9001DBF4 0x008500B0
* DB8520v2.2 0x412fc091 0x9001DBF4 0x008500B2
* DB5500v1 0x412fc091 0x9001FFF4 0x005500A0 * DB5500v1 0x412fc091 0x9001FFF4 0x005500A0
*/ */
...@@ -80,9 +81,10 @@ void __init ux500_map_io(void) ...@@ -80,9 +81,10 @@ void __init ux500_map_io(void)
addr = 0x9001FFF4; addr = 0x9001FFF4;
break; break;
case 0x412fc091: /* DB8500v2 / DB5500v1 */ case 0x412fc091: /* DB8520 / DB8500v2 / DB5500v1 */
asicid = ux500_read_asicid(0x9001DBF4); asicid = ux500_read_asicid(0x9001DBF4);
if (partnumber(asicid) == 0x8500) if (partnumber(asicid) == 0x8500 ||
partnumber(asicid) == 0x8520)
/* DB8500v2 */ /* DB8500v2 */
break; break;
......
...@@ -65,8 +65,11 @@ ...@@ -65,8 +65,11 @@
#define U5500_PRCMU_TIMER_4_BASE (U5500_PER4_BASE + 0x07450) #define U5500_PRCMU_TIMER_4_BASE (U5500_PER4_BASE + 0x07450)
#define U5500_MSP1_BASE (U5500_PER4_BASE + 0x9000) #define U5500_MSP1_BASE (U5500_PER4_BASE + 0x9000)
#define U5500_GPIO2_BASE (U5500_PER4_BASE + 0xA000) #define U5500_GPIO2_BASE (U5500_PER4_BASE + 0xA000)
#define U5500_MTIMER_BASE (U5500_PER4_BASE + 0xC000)
#define U5500_CDETECT_BASE (U5500_PER4_BASE + 0xF000) #define U5500_CDETECT_BASE (U5500_PER4_BASE + 0xF000)
#define U5500_PRCMU_TCDM_BASE (U5500_PER4_BASE + 0x18000) #define U5500_PRCMU_TCDM_BASE (U5500_PER4_BASE + 0x18000)
#define U5500_PRCMU_TCPM_BASE (U5500_PER4_BASE + 0x10000)
#define U5500_TPIU_BASE (U5500_PER4_BASE + 0x50000)
#define U5500_SPI0_BASE (U5500_PER5_BASE + 0x0000) #define U5500_SPI0_BASE (U5500_PER5_BASE + 0x0000)
#define U5500_SPI1_BASE (U5500_PER5_BASE + 0x1000) #define U5500_SPI1_BASE (U5500_PER5_BASE + 0x1000)
...@@ -125,6 +128,7 @@ ...@@ -125,6 +128,7 @@
#define U5500_ACCCON_BASE (0xBFFF1000) #define U5500_ACCCON_BASE (0xBFFF1000)
#define U5500_ACCCON_CPUVEC_RESET_ADDR_OFFSET (0x00000020) #define U5500_ACCCON_CPUVEC_RESET_ADDR_OFFSET (0x00000020)
#define U5500_ACCCON_ACC_CPU_CTRL_OFFSET (0x000000BC) #define U5500_ACCCON_ACC_CPU_CTRL_OFFSET (0x000000BC)
#define U5500_INTCON_MBOX1_INT_RESET_ADDR (0xBFFD31A4)
#define U5500_ESRAM_BASE 0x40000000 #define U5500_ESRAM_BASE 0x40000000
#define U5500_ESRAM_DMA_LCPA_OFFSET 0x10000 #define U5500_ESRAM_DMA_LCPA_OFFSET 0x10000
......
...@@ -22,7 +22,9 @@ ...@@ -22,7 +22,9 @@
#define U8500_ESRAM_DMA_LCPA_OFFSET 0x10000 #define U8500_ESRAM_DMA_LCPA_OFFSET 0x10000
#define U8500_DMA_LCPA_BASE (U8500_ESRAM_BANK0 + U8500_ESRAM_DMA_LCPA_OFFSET) #define U8500_DMA_LCPA_BASE (U8500_ESRAM_BANK0 + U8500_ESRAM_DMA_LCPA_OFFSET)
#define U8500_DMA_LCPA_BASE_ED (U8500_ESRAM_BANK4 + 0x4000)
/* This address fulfills the 256k alignment requirement of the lcla base */
#define U8500_DMA_LCLA_BASE U8500_ESRAM_BANK4
#define U8500_PER3_BASE 0x80000000 #define U8500_PER3_BASE 0x80000000
#define U8500_STM_BASE 0x80100000 #define U8500_STM_BASE 0x80100000
...@@ -40,15 +42,14 @@ ...@@ -40,15 +42,14 @@
#define U8500_ASIC_ID_BASE 0x9001D000 #define U8500_ASIC_ID_BASE 0x9001D000
#define U8500_PER6_BASE 0xa03c0000 #define U8500_PER6_BASE 0xa03c0000
#define U8500_PER7_BASE 0xa03d0000
#define U8500_PER5_BASE 0xa03e0000 #define U8500_PER5_BASE 0xa03e0000
#define U8500_PER7_BASE_ED 0xa03d0000
#define U8500_SVA_BASE 0xa0100000 #define U8500_SVA_BASE 0xa0100000
#define U8500_SIA_BASE 0xa0200000 #define U8500_SIA_BASE 0xa0200000
#define U8500_SGA_BASE 0xa0300000 #define U8500_SGA_BASE 0xa0300000
#define U8500_MCDE_BASE 0xa0350000 #define U8500_MCDE_BASE 0xa0350000
#define U8500_DMA_BASE_ED 0xa0362000
#define U8500_DMA_BASE 0x801C0000 /* v1 */ #define U8500_DMA_BASE 0x801C0000 /* v1 */
#define U8500_SBAG_BASE 0xa0390000 #define U8500_SBAG_BASE 0xa0390000
...@@ -66,13 +67,6 @@ ...@@ -66,13 +67,6 @@
#define U8500_GPIO2_BASE (U8500_PER2_BASE + 0xE000) #define U8500_GPIO2_BASE (U8500_PER2_BASE + 0xE000)
#define U8500_GPIO3_BASE (U8500_PER5_BASE + 0x1E000) #define U8500_GPIO3_BASE (U8500_PER5_BASE + 0x1E000)
/* per7 base addresses */
#define U8500_CR_BASE_ED (U8500_PER7_BASE_ED + 0x8000)
#define U8500_MTU0_BASE_ED (U8500_PER7_BASE_ED + 0xa000)
#define U8500_MTU1_BASE_ED (U8500_PER7_BASE_ED + 0xb000)
#define U8500_TZPC0_BASE_ED (U8500_PER7_BASE_ED + 0xc000)
#define U8500_CLKRST7_BASE_ED (U8500_PER7_BASE_ED + 0xf000)
#define U8500_UART0_BASE (U8500_PER1_BASE + 0x0000) #define U8500_UART0_BASE (U8500_PER1_BASE + 0x0000)
#define U8500_UART1_BASE (U8500_PER1_BASE + 0x1000) #define U8500_UART1_BASE (U8500_PER1_BASE + 0x1000)
...@@ -102,12 +96,10 @@ ...@@ -102,12 +96,10 @@
#define U8500_SCR_BASE (U8500_PER4_BASE + 0x05000) #define U8500_SCR_BASE (U8500_PER4_BASE + 0x05000)
#define U8500_DMC_BASE (U8500_PER4_BASE + 0x06000) #define U8500_DMC_BASE (U8500_PER4_BASE + 0x06000)
#define U8500_PRCMU_BASE (U8500_PER4_BASE + 0x07000) #define U8500_PRCMU_BASE (U8500_PER4_BASE + 0x07000)
#define U8500_PRCMU_TIMER_3_BASE (U8500_PER4_BASE + 0x07338)
#define U8500_PRCMU_TIMER_4_BASE (U8500_PER4_BASE + 0x07450)
#define U8500_PRCMU_TCDM_BASE_V1 (U8500_PER4_BASE + 0x0f000)
#define U8500_PRCMU_TCDM_BASE (U8500_PER4_BASE + 0x68000) #define U8500_PRCMU_TCDM_BASE (U8500_PER4_BASE + 0x68000)
#define U8500_PRCMU_TCPM_BASE (U8500_PER4_BASE + 0x60000) #define U8500_PRCMU_TCPM_BASE (U8500_PER4_BASE + 0x60000)
#define U8500_PRCMU_TIMER_3_BASE (U8500_PER4_BASE + 0x07338)
#define U8500_PRCMU_TIMER_4_BASE (U8500_PER4_BASE + 0x07450)
/* per3 base addresses */ /* per3 base addresses */
#define U8500_FSMC_BASE (U8500_PER3_BASE + 0x0000) #define U8500_FSMC_BASE (U8500_PER3_BASE + 0x0000)
......
...@@ -18,6 +18,4 @@ extern struct amba_device ux500_pl031_device; ...@@ -18,6 +18,4 @@ extern struct amba_device ux500_pl031_device;
extern struct platform_device u8500_dma40_device; extern struct platform_device u8500_dma40_device;
extern struct platform_device ux500_ske_keypad_device; extern struct platform_device ux500_ske_keypad_device;
void dma40_u8500ed_fixup(void);
#endif #endif
...@@ -10,20 +10,21 @@ ...@@ -10,20 +10,21 @@
#ifndef __MACH_HARDWARE_H #ifndef __MACH_HARDWARE_H
#define __MACH_HARDWARE_H #define __MACH_HARDWARE_H
/* macros to get at IO space when running virtually /*
* Macros to get at IO space when running virtually
* We dont map all the peripherals, let ioremap do * We dont map all the peripherals, let ioremap do
* this for us. We map only very basic peripherals here. * this for us. We map only very basic peripherals here.
*/ */
#define U8500_IO_VIRTUAL 0xf0000000 #define U8500_IO_VIRTUAL 0xf0000000
#define U8500_IO_PHYSICAL 0xa0000000 #define U8500_IO_PHYSICAL 0xa0000000
/* this macro is used in assembly, so no cast */ /* This macro is used in assembly, so no cast */
#define IO_ADDRESS(x) \ #define IO_ADDRESS(x) \
(((x) & 0x0fffffff) + (((x) >> 4) & 0x0f000000) + U8500_IO_VIRTUAL) (((x) & 0x0fffffff) + (((x) >> 4) & 0x0f000000) + U8500_IO_VIRTUAL)
/* typesafe io address */ /* typesafe io address */
#define __io_address(n) __io(IO_ADDRESS(n)) #define __io_address(n) __io(IO_ADDRESS(n))
/* used by some plat-nomadik code */ /* Used by some plat-nomadik code */
#define io_p2v(n) __io_address(n) #define io_p2v(n) __io_address(n)
#include <mach/db8500-regs.h> #include <mach/db8500-regs.h>
...@@ -36,6 +37,5 @@ extern void __iomem *_PRCMU_BASE; ...@@ -36,6 +37,5 @@ extern void __iomem *_PRCMU_BASE;
#define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x) #define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x)
#endif #endif /* __ASSEMBLY__ */
#endif /* __MACH_HARDWARE_H */ #endif /* __MACH_HARDWARE_H */
...@@ -46,6 +46,30 @@ static inline bool __attribute_const__ cpu_is_u5500(void) ...@@ -46,6 +46,30 @@ static inline bool __attribute_const__ cpu_is_u5500(void)
return dbx500_partnumber() == 0x5500; return dbx500_partnumber() == 0x5500;
} }
/*
* 5500 revisions
*/
static inline bool __attribute_const__ cpu_is_u5500v1(void)
{
return cpu_is_u5500() && (dbx500_revision() & 0xf0) == 0xA0;
}
static inline bool __attribute_const__ cpu_is_u5500v2(void)
{
return (dbx500_id.revision & 0xf0) == 0xB0;
}
static inline bool __attribute_const__ cpu_is_u5500v20(void)
{
return cpu_is_u5500() && ((dbx500_revision() & 0xf0) == 0xB0);
}
static inline bool __attribute_const__ cpu_is_u5500v21(void)
{
return cpu_is_u5500() && (dbx500_revision() == 0xB1);
}
/* /*
* 8500 revisions * 8500 revisions
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment