提交 ac3524b7 编写于 作者: A Andrew Lunn 提交者: Arnd Bergmann

ARM: Orion5x: ts78xx: Add IOMEM for virtual addresses.

Also convert logical or to + for register offsets from base
addresses. This fixes a number of warnings currently seen in
linux-next:

warning: passing argument 2 of '__raw_writeb' makes pointer from
interger without cast.
Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
Signed-off-by: NArnd Bergmann <arnd@arndb.de>
上级 20ef52a8
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
* FPGA - lives where the PCI bus would be at ORION5X_PCI_MEM_PHYS_BASE * FPGA - lives where the PCI bus would be at ORION5X_PCI_MEM_PHYS_BASE
*/ */
#define TS78XX_FPGA_REGS_PHYS_BASE 0xe8000000 #define TS78XX_FPGA_REGS_PHYS_BASE 0xe8000000
#define TS78XX_FPGA_REGS_VIRT_BASE 0xff900000 #define TS78XX_FPGA_REGS_VIRT_BASE IOMEM(0xff900000)
#define TS78XX_FPGA_REGS_SIZE SZ_1M #define TS78XX_FPGA_REGS_SIZE SZ_1M
static struct ts78xx_fpga_data ts78xx_fpga = { static struct ts78xx_fpga_data ts78xx_fpga = {
...@@ -50,7 +50,7 @@ static struct ts78xx_fpga_data ts78xx_fpga = { ...@@ -50,7 +50,7 @@ static struct ts78xx_fpga_data ts78xx_fpga = {
****************************************************************************/ ****************************************************************************/
static struct map_desc ts78xx_io_desc[] __initdata = { static struct map_desc ts78xx_io_desc[] __initdata = {
{ {
.virtual = TS78XX_FPGA_REGS_VIRT_BASE, .virtual = (unsigned long)TS78XX_FPGA_REGS_VIRT_BASE,
.pfn = __phys_to_pfn(TS78XX_FPGA_REGS_PHYS_BASE), .pfn = __phys_to_pfn(TS78XX_FPGA_REGS_PHYS_BASE),
.length = TS78XX_FPGA_REGS_SIZE, .length = TS78XX_FPGA_REGS_SIZE,
.type = MT_DEVICE, .type = MT_DEVICE,
...@@ -80,8 +80,8 @@ static struct mv_sata_platform_data ts78xx_sata_data = { ...@@ -80,8 +80,8 @@ static struct mv_sata_platform_data ts78xx_sata_data = {
/***************************************************************************** /*****************************************************************************
* RTC M48T86 - nicked^Wborrowed from arch/arm/mach-ep93xx/ts72xx.c * RTC M48T86 - nicked^Wborrowed from arch/arm/mach-ep93xx/ts72xx.c
****************************************************************************/ ****************************************************************************/
#define TS_RTC_CTRL (TS78XX_FPGA_REGS_VIRT_BASE | 0x808) #define TS_RTC_CTRL (TS78XX_FPGA_REGS_VIRT_BASE + 0x808)
#define TS_RTC_DATA (TS78XX_FPGA_REGS_VIRT_BASE | 0x80c) #define TS_RTC_DATA (TS78XX_FPGA_REGS_VIRT_BASE + 0x80c)
static unsigned char ts78xx_ts_rtc_readbyte(unsigned long addr) static unsigned char ts78xx_ts_rtc_readbyte(unsigned long addr)
{ {
...@@ -162,8 +162,8 @@ static void ts78xx_ts_rtc_unload(void) ...@@ -162,8 +162,8 @@ static void ts78xx_ts_rtc_unload(void)
/***************************************************************************** /*****************************************************************************
* NAND Flash * NAND Flash
****************************************************************************/ ****************************************************************************/
#define TS_NAND_CTRL (TS78XX_FPGA_REGS_VIRT_BASE | 0x800) /* VIRT */ #define TS_NAND_CTRL (TS78XX_FPGA_REGS_VIRT_BASE + 0x800) /* VIRT */
#define TS_NAND_DATA (TS78XX_FPGA_REGS_PHYS_BASE | 0x804) /* PHYS */ #define TS_NAND_DATA (TS78XX_FPGA_REGS_PHYS_BASE + 0x804) /* PHYS */
/* /*
* hardware specific access to control-lines * hardware specific access to control-lines
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册