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

Commit 0a4b04dc authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

ARM: shmobile: use __iomem pointers for MMIO



ARM is moving to stricter checks on readl/write functions,
so we need to use the correct types everywhere.

This patch is a bit ugly for shmobile, which is the only platform
that just uses integer literals all over the place, but I can't
see a better way to do this.

Acked-by: default avatarSimon Horman <horms@verge.net.au>
Cc: Magnus Damm <magnus.damm@gmail.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: linux-sh@vger.kernel.org
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent 4cbe5a55
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -432,7 +432,7 @@ static void usb1_host_port_power(int port, int power)
		return;

	/* set VBOUT/PWEN and EXTLP1 in DVSTCTR */
	__raw_writew(__raw_readw(0xE68B0008) | 0x600, 0xE68B0008);
	__raw_writew(__raw_readw(IOMEM(0xE68B0008)) | 0x600, IOMEM(0xE68B0008));
}

static struct r8a66597_platdata usb1_host_data = {
@@ -1224,9 +1224,9 @@ static struct i2c_board_info i2c1_devices[] = {
};


#define GPIO_PORT9CR	0xE6051009
#define GPIO_PORT10CR	0xE605100A
#define USCCR1		0xE6058144
#define GPIO_PORT9CR	IOMEM(0xE6051009)
#define GPIO_PORT10CR	IOMEM(0xE605100A)
#define USCCR1		IOMEM(0xE6058144)
static void __init ap4evb_init(void)
{
	u32 srcr4;
@@ -1304,7 +1304,7 @@ static void __init ap4evb_init(void)
	gpio_request(GPIO_FN_OVCN2_1,    NULL);

	/* setup USB phy */
	__raw_writew(0x8a0a, 0xE6058130);	/* USBCR4 */
	__raw_writew(0x8a0a, IOMEM(0xE6058130));	/* USBCR4 */

	/* enable FSI2 port A (ak4643) */
	gpio_request(GPIO_FN_FSIAIBT,	NULL);
@@ -1453,7 +1453,7 @@ static void __init ap4evb_init(void)
	gpio_request(GPIO_FN_HDMI_CEC, NULL);

	/* Reset HDMI, must be held at least one EXTALR (32768Hz) period */
#define SRCR4 0xe61580bc
#define SRCR4 IOMEM(0xe61580bc)
	srcr4 = __raw_readl(SRCR4);
	__raw_writel(srcr4 | (1 << 13), SRCR4);
	udelay(50);
+3 −3
Original line number Diff line number Diff line
@@ -135,7 +135,7 @@
 *	usbhsf_power_ctrl()
 */
#define IRQ7		evt2irq(0x02e0)
#define USBCR1		0xe605810a
#define USBCR1		IOMEM(0xe605810a)
#define USBH		0xC6700000
#define USBH_USBCTR	0x10834

@@ -949,8 +949,8 @@ static void __init eva_clock_init(void)
/*
 * board init
 */
#define GPIO_PORT7CR	0xe6050007
#define GPIO_PORT8CR	0xe6050008
#define GPIO_PORT7CR	IOMEM(0xe6050007)
#define GPIO_PORT8CR	IOMEM(0xe6050008)
static void __init eva_init(void)
{
	struct platform_device *usb = NULL;
+4 −4
Original line number Diff line number Diff line
@@ -108,12 +108,12 @@ static struct regulator_consumer_supply dummy_supplies[] = {
#define FPGA_ETH_IRQ		(FPGA_IRQ0 + 15)
static u16 bonito_fpga_read(u32 offset)
{
	return __raw_readw(0xf0003000 + offset);
	return __raw_readw(IOMEM(0xf0003000) + offset);
}

static void bonito_fpga_write(u32 offset, u16 val)
{
	__raw_writew(val, 0xf0003000 + offset);
	__raw_writew(val, IOMEM(0xf0003000) + offset);
}

static void bonito_fpga_irq_disable(struct irq_data *data)
@@ -361,8 +361,8 @@ static void __init bonito_map_io(void)
#define BIT_ON(sw, bit)		(sw & (1 << bit))
#define BIT_OFF(sw, bit)	(!(sw & (1 << bit)))

#define VCCQ1CR		0xE6058140
#define VCCQ1LCDCR	0xE6058186
#define VCCQ1CR		IOMEM(0xE6058140)
#define VCCQ1LCDCR	IOMEM(0xE6058186)

static void __init bonito_init(void)
{
+6 −6
Original line number Diff line number Diff line
@@ -106,7 +106,7 @@ static void usb_host_port_power(int port, int power)
		return;

	/* set VBOUT/PWEN and EXTLP0 in DVSTCTR */
	__raw_writew(__raw_readw(0xe6890008) | 0x600, 0xe6890008);
	__raw_writew(__raw_readw(IOMEM(0xe6890008)) | 0x600, IOMEM(0xe6890008));
}

static struct r8a66597_platdata usb_host_data = {
@@ -279,10 +279,10 @@ static void __init g3evm_init(void)
	gpio_request(GPIO_FN_IDIN, NULL);

	/* setup USB phy */
	__raw_writew(0x0300, 0xe605810a);	/* USBCR1 */
	__raw_writew(0x00e0, 0xe60581c0);	/* CPFCH */
	__raw_writew(0x6010, 0xe60581c6);	/* CGPOSR */
	__raw_writew(0x8a0a, 0xe605810c);	/* USBCR2 */
	__raw_writew(0x0300, IOMEM(0xe605810a));	/* USBCR1 */
	__raw_writew(0x00e0, IOMEM(0xe60581c0));	/* CPFCH */
	__raw_writew(0x6010, IOMEM(0xe60581c6));	/* CGPOSR */
	__raw_writew(0x8a0a, IOMEM(0xe605810c));	/* USBCR2 */

	/* KEYSC @ CN7 */
	gpio_request(GPIO_FN_PORT42_KEYOUT0, NULL);
@@ -320,7 +320,7 @@ static void __init g3evm_init(void)
	gpio_request(GPIO_FN_WE0_XWR0_FWE, NULL);
	gpio_request(GPIO_FN_FRB, NULL);
	/* FOE, FCDE, FSC on dedicated pins */
	__raw_writel(__raw_readl(0xe6158048) & ~(1 << 15), 0xe6158048);
	__raw_writel(__raw_readl(IOMEM(0xe6158048)) & ~(1 << 15), IOMEM(0xe6158048));

	/* IrDA */
	gpio_request(GPIO_FN_IRDA_OUT, NULL);
+15 −15
Original line number Diff line number Diff line
@@ -126,7 +126,7 @@ static void usb_host_port_power(int port, int power)
		return;

	/* set VBOUT/PWEN and EXTLP0 in DVSTCTR */
	__raw_writew(__raw_readw(0xe6890008) | 0x600, 0xe6890008);
	__raw_writew(__raw_readw(IOMEM(0xe6890008)) | 0x600, IOMEM(0xe6890008));
}

static struct r8a66597_platdata usb_host_data = {
@@ -270,17 +270,17 @@ static struct platform_device *g4evm_devices[] __initdata = {
	&sdhi1_device,
};

#define GPIO_SDHID0_D0	0xe60520fc
#define GPIO_SDHID0_D1	0xe60520fd
#define GPIO_SDHID0_D2	0xe60520fe
#define GPIO_SDHID0_D3	0xe60520ff
#define GPIO_SDHICMD0	0xe6052100
#define GPIO_SDHID0_D0	IOMEM(0xe60520fc)
#define GPIO_SDHID0_D1	IOMEM(0xe60520fd)
#define GPIO_SDHID0_D2	IOMEM(0xe60520fe)
#define GPIO_SDHID0_D3	IOMEM(0xe60520ff)
#define GPIO_SDHICMD0	IOMEM(0xe6052100)

#define GPIO_SDHID1_D0	0xe6052103
#define GPIO_SDHID1_D1	0xe6052104
#define GPIO_SDHID1_D2	0xe6052105
#define GPIO_SDHID1_D3	0xe6052106
#define GPIO_SDHICMD1	0xe6052107
#define GPIO_SDHID1_D0	IOMEM(0xe6052103)
#define GPIO_SDHID1_D1	IOMEM(0xe6052104)
#define GPIO_SDHID1_D2	IOMEM(0xe6052105)
#define GPIO_SDHID1_D3	IOMEM(0xe6052106)
#define GPIO_SDHICMD1	IOMEM(0xe6052107)

static void __init g4evm_init(void)
{
@@ -318,10 +318,10 @@ static void __init g4evm_init(void)
	gpio_request(GPIO_FN_IDIN, NULL);

	/* setup USB phy */
	__raw_writew(0x0200, 0xe605810a);       /* USBCR1 */
	__raw_writew(0x00e0, 0xe60581c0);       /* CPFCH */
	__raw_writew(0x6010, 0xe60581c6);       /* CGPOSR */
	__raw_writew(0x8a0a, 0xe605810c);       /* USBCR2 */
	__raw_writew(0x0200, IOMEM(0xe605810a));       /* USBCR1 */
	__raw_writew(0x00e0, IOMEM(0xe60581c0));       /* CPFCH */
	__raw_writew(0x6010, IOMEM(0xe60581c6));       /* CGPOSR */
	__raw_writew(0x8a0a, IOMEM(0xe605810c));       /* USBCR2 */

	/* KEYSC @ CN31 */
	gpio_request(GPIO_FN_PORT60_KEYOUT5, NULL);
Loading