Skip to content

Commit 1cf46c4

Browse files
committed
unicore32: modify io_p2v and io_v2p macros, and adjust PKUNITY_mmio_BASEs
1. remove __REG macro 2. add (void __iomem *) to io_p2v macro 3. add (phys_addr_t) to io_v2p macro 4. add PKUNITY_AHB_BASE and PKUNITY_APB_BASE definitions 5. modify all PKUNITY_mmio_BASEs from physical addr to virtual addr 6. adjust prefix macro for all usage of PKUNITY_mmio_BASEs -- by advice with Arnd Bergmann Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn> Reviewed-by: Arnd Bergmann <arnd@arndb.de>
1 parent 4fde87c commit 1cf46c4

26 files changed

Lines changed: 365 additions & 362 deletions

‎arch/unicore32/include/asm/io.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#include <asm/memory.h>
1919
#include <asm/system.h>
2020

21-
#define PCI_IOBASE io_p2v(PKUNITY_PCILIO_BASE)
21+
#define PCI_IOBASE PKUNITY_PCILIO_BASE
2222
#include <asm-generic/io.h>
2323

2424
/*

‎arch/unicore32/include/mach/PKUnity.h‎

Lines changed: 46 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -22,83 +22,87 @@
2222
*/
2323
#define PKUNITY_SDRAM_BASE 0x00000000 /* 0x00000000 - 0x7FFFFFFF 2GB */
2424
#define PKUNITY_MMIO_BASE 0x80000000 /* 0x80000000 - 0xFFFFFFFF 2GB */
25-
#define PKUNITY_PCI_BASE 0x80000000 /* 0x80000000 - 0xBFFFFFFF 1GB */
26-
#include "regs-pci.h"
27-
#define PKUNITY_BOOT_ROM2_BASE 0xF4000000 /* 0xF4000000 - 0xF7FFFFFF 64MB */
28-
#define PKUNITY_BOOT_SRAM2_BASE 0xF8000000 /* 0xF8000000 - 0xFBFFFFFF 64MB */
29-
#define PKUNITY_BOOT_FLASH_BASE 0xFC000000 /* 0xFC000000 - 0xFFFFFFFF 64MB */
3025

3126
/*
3227
* PKUNITY Memory Map Addresses: 0x0D000000 - 0x0EFFFFFF (32MB)
28+
* 0x0D000000 - 0x0DFFFFFF 16MB: for UVC
29+
* 0x0E000000 - 0x0EFFFFFF 16MB: for UNIGFX
3330
*/
34-
#define PKUNITY_UVC_MMAP_BASE 0x0D000000 /* 0x0D000000 - 0x0DFFFFFF 16MB */
31+
#define PKUNITY_UVC_MMAP_BASE 0x0D000000
3532
#define PKUNITY_UVC_MMAP_SIZE 0x01000000 /* 16MB */
36-
#define PKUNITY_UNIGFX_MMAP_BASE 0x0E000000 /* 0x0E000000 - 0x0EFFFFFF 16MB */
33+
#define PKUNITY_UNIGFX_MMAP_BASE 0x0E000000
3734
#define PKUNITY_UNIGFX_MMAP_SIZE 0x01000000 /* 16MB */
3835

3936
/*
4037
* PKUNITY System Bus Addresses (PCI): 0x80000000 - 0xBFFFFFFF (1GB)
38+
* 0x80000000 - 0x8000000B 12B PCI Configuration regs
39+
* 0x80010000 - 0x80010250 592B PCI Bridge Base
40+
* 0x80030000 - 0x8003FFFF 64KB PCI Legacy IO
41+
* 0x90000000 - 0x97FFFFFF 128MB PCI AHB-PCI MEM-mapping
42+
* 0x98000000 - 0x9FFFFFFF 128MB PCI PCI-AHB MEM-mapping
4143
*/
42-
/* PCI Configuration regs */
43-
#define PKUNITY_PCICFG_BASE 0x80000000 /* 0x80000000 - 0x8000000B 12B */
44-
/* PCI Bridge Base */
45-
#define PKUNITY_PCIBRI_BASE 0x80010000 /* 0x80010000 - 0x80010250 592B */
46-
/* PCI Legacy IO */
47-
#define PKUNITY_PCILIO_BASE 0x80030000 /* 0x80030000 - 0x8003FFFF 64KB */
48-
/* PCI AHB-PCI MEM-mapping */
49-
#define PKUNITY_PCIMEM_BASE 0x90000000 /* 0x90000000 - 0x97FFFFFF 128MB */
50-
/* PCI PCI-AHB MEM-mapping */
51-
#define PKUNITY_PCIAHB_BASE 0x98000000 /* 0x98000000 - 0x9FFFFFFF 128MB */
44+
#define PKUNITY_PCI_BASE io_p2v(0x80000000) /* 0x80000000 - 0xBFFFFFFF 1GB */
45+
#include "regs-pci.h"
46+
47+
#define PKUNITY_PCICFG_BASE (PKUNITY_PCI_BASE + 0x0)
48+
#define PKUNITY_PCIBRI_BASE (PKUNITY_PCI_BASE + 0x00010000)
49+
#define PKUNITY_PCILIO_BASE (PKUNITY_PCI_BASE + 0x00030000)
50+
#define PKUNITY_PCIMEM_BASE (PKUNITY_PCI_BASE + 0x10000000)
51+
#define PKUNITY_PCIAHB_BASE (PKUNITY_PCI_BASE + 0x18000000)
5252

5353
/*
5454
* PKUNITY System Bus Addresses (AHB): 0xC0000000 - 0xEDFFFFFF (640MB)
5555
*/
56+
#define PKUNITY_AHB_BASE io_p2v(0xC0000000)
57+
5658
/* AHB-0 is DDR2 SDRAM */
5759
/* AHB-1 is PCI Space */
58-
#define PKUNITY_ARBITER_BASE 0xC0000000 /* AHB-2 */
59-
#define PKUNITY_DDR2CTRL_BASE 0xC0100000 /* AHB-3 */
60-
#define PKUNITY_DMAC_BASE 0xC0200000 /* AHB-4 */
60+
#define PKUNITY_ARBITER_BASE (PKUNITY_AHB_BASE + 0x000000) /* AHB-2 */
61+
#define PKUNITY_DDR2CTRL_BASE (PKUNITY_AHB_BASE + 0x100000) /* AHB-3 */
62+
#define PKUNITY_DMAC_BASE (PKUNITY_AHB_BASE + 0x200000) /* AHB-4 */
6163
#include "regs-dmac.h"
62-
#define PKUNITY_UMAL_BASE 0xC0300000 /* AHB-5 */
64+
#define PKUNITY_UMAL_BASE (PKUNITY_AHB_BASE + 0x300000) /* AHB-5 */
6365
#include "regs-umal.h"
64-
#define PKUNITY_USB_BASE 0xC0400000 /* AHB-6 */
65-
#define PKUNITY_SATA_BASE 0xC0500000 /* AHB-7 */
66-
#define PKUNITY_SMC_BASE 0xC0600000 /* AHB-8 */
66+
#define PKUNITY_USB_BASE (PKUNITY_AHB_BASE + 0x400000) /* AHB-6 */
67+
#define PKUNITY_SATA_BASE (PKUNITY_AHB_BASE + 0x500000) /* AHB-7 */
68+
#define PKUNITY_SMC_BASE (PKUNITY_AHB_BASE + 0x600000) /* AHB-8 */
6769
/* AHB-9 is for APB bridge */
68-
#define PKUNITY_MME_BASE 0xC0700000 /* AHB-10 */
69-
#define PKUNITY_UNIGFX_BASE 0xC0800000 /* AHB-11 */
70+
#define PKUNITY_MME_BASE (PKUNITY_AHB_BASE + 0x700000) /* AHB-10 */
71+
#define PKUNITY_UNIGFX_BASE (PKUNITY_AHB_BASE + 0x800000) /* AHB-11 */
7072
#include "regs-unigfx.h"
71-
#define PKUNITY_NAND_BASE 0xC0900000 /* AHB-12 */
73+
#define PKUNITY_NAND_BASE (PKUNITY_AHB_BASE + 0x900000) /* AHB-12 */
7274
#include "regs-nand.h"
73-
#define PKUNITY_H264D_BASE 0xC0A00000 /* AHB-13 */
74-
#define PKUNITY_H264E_BASE 0xC0B00000 /* AHB-14 */
75+
#define PKUNITY_H264D_BASE (PKUNITY_AHB_BASE + 0xA00000) /* AHB-13 */
76+
#define PKUNITY_H264E_BASE (PKUNITY_AHB_BASE + 0xB00000) /* AHB-14 */
7577

7678
/*
7779
* PKUNITY Peripheral Bus Addresses (APB): 0xEE000000 - 0xEFFFFFFF (128MB)
7880
*/
79-
#define PKUNITY_UART0_BASE 0xEE000000 /* APB-0 */
80-
#define PKUNITY_UART1_BASE 0xEE100000 /* APB-1 */
81+
#define PKUNITY_APB_BASE io_p2v(0xEE000000)
82+
83+
#define PKUNITY_UART0_BASE (PKUNITY_APB_BASE + 0x000000) /* APB-0 */
84+
#define PKUNITY_UART1_BASE (PKUNITY_APB_BASE + 0x100000) /* APB-1 */
8185
#include "regs-uart.h"
82-
#define PKUNITY_I2C_BASE 0xEE200000 /* APB-2 */
86+
#define PKUNITY_I2C_BASE (PKUNITY_APB_BASE + 0x200000) /* APB-2 */
8387
#include "regs-i2c.h"
84-
#define PKUNITY_SPI_BASE 0xEE300000 /* APB-3 */
88+
#define PKUNITY_SPI_BASE (PKUNITY_APB_BASE + 0x300000) /* APB-3 */
8589
#include "regs-spi.h"
86-
#define PKUNITY_AC97_BASE 0xEE400000 /* APB-4 */
90+
#define PKUNITY_AC97_BASE (PKUNITY_APB_BASE + 0x400000) /* APB-4 */
8791
#include "regs-ac97.h"
88-
#define PKUNITY_GPIO_BASE 0xEE500000 /* APB-5 */
92+
#define PKUNITY_GPIO_BASE (PKUNITY_APB_BASE + 0x500000) /* APB-5 */
8993
#include "regs-gpio.h"
90-
#define PKUNITY_INTC_BASE 0xEE600000 /* APB-6 */
94+
#define PKUNITY_INTC_BASE (PKUNITY_APB_BASE + 0x600000) /* APB-6 */
9195
#include "regs-intc.h"
92-
#define PKUNITY_RTC_BASE 0xEE700000 /* APB-7 */
96+
#define PKUNITY_RTC_BASE (PKUNITY_APB_BASE + 0x700000) /* APB-7 */
9397
#include "regs-rtc.h"
94-
#define PKUNITY_OST_BASE 0xEE800000 /* APB-8 */
98+
#define PKUNITY_OST_BASE (PKUNITY_APB_BASE + 0x800000) /* APB-8 */
9599
#include "regs-ost.h"
96-
#define PKUNITY_RESETC_BASE 0xEE900000 /* APB-9 */
100+
#define PKUNITY_RESETC_BASE (PKUNITY_APB_BASE + 0x900000) /* APB-9 */
97101
#include "regs-resetc.h"
98-
#define PKUNITY_PM_BASE 0xEEA00000 /* APB-10 */
102+
#define PKUNITY_PM_BASE (PKUNITY_APB_BASE + 0xA00000) /* APB-10 */
99103
#include "regs-pm.h"
100-
#define PKUNITY_PS2_BASE 0xEEB00000 /* APB-11 */
104+
#define PKUNITY_PS2_BASE (PKUNITY_APB_BASE + 0xB00000) /* APB-11 */
101105
#include "regs-ps2.h"
102-
#define PKUNITY_SDC_BASE 0xEEC00000 /* APB-12 */
106+
#define PKUNITY_SDC_BASE (PKUNITY_APB_BASE + 0xC00000) /* APB-12 */
103107
#include "regs-sdc.h"
104108

‎arch/unicore32/include/mach/hardware.h‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,16 @@
1717

1818
#include "PKUnity.h"
1919

20+
#ifndef __ASSEMBLY__
21+
#define io_p2v(x) (void __iomem *)((x) - PKUNITY_MMIO_BASE)
22+
#define io_v2p(x) (phys_addr_t)((x) + PKUNITY_MMIO_BASE)
23+
#else
2024
#define io_p2v(x) ((x) - PKUNITY_MMIO_BASE)
2125
#define io_v2p(x) ((x) + PKUNITY_MMIO_BASE)
22-
23-
#ifndef __ASSEMBLY__
24-
25-
# define __REG(x) (void __iomem *)io_p2v(x)
26-
2726
#endif
2827

2928
#define PCIBIOS_MIN_IO 0x4000 /* should lower than 64KB */
30-
#define PCIBIOS_MIN_MEM PKUNITY_PCIMEM_BASE
29+
#define PCIBIOS_MIN_MEM io_v2p(PKUNITY_PCIMEM_BASE)
3130

3231
/*
3332
* We override the standard dma-mask routines for bouncing.

‎arch/unicore32/include/mach/memory.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ void puv3_pci_adjust_zones(unsigned long *size, unsigned long *holes);
4545
#define is_pcibus_device(dev) (dev && \
4646
(strncmp(dev->bus->name, "pci", 3) == 0))
4747

48-
#define __virt_to_pcibus(x) (__virt_to_phys(x) + PKUNITY_PCIAHB_BASE)
49-
#define __pcibus_to_virt(x) __phys_to_virt((x) - PKUNITY_PCIAHB_BASE)
48+
#define __virt_to_pcibus(x) (__virt_to_phys((x) + PKUNITY_PCIAHB_BASE))
49+
#define __pcibus_to_virt(x) (__phys_to_virt(x) - PKUNITY_PCIAHB_BASE)
5050

5151
/* kuser area */
5252
#define KUSER_VECPAGE_BASE (KUSER_BASE + UL(0x3fff0000))

‎arch/unicore32/include/mach/regs-ac97.h‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
* PKUnity AC97 Registers
33
*/
44

5-
#define PKUNITY_AC97_CONR __REG(PKUNITY_AC97_BASE + 0x0000)
6-
#define PKUNITY_AC97_OCR __REG(PKUNITY_AC97_BASE + 0x0004)
7-
#define PKUNITY_AC97_ICR __REG(PKUNITY_AC97_BASE + 0x0008)
8-
#define PKUNITY_AC97_CRAC __REG(PKUNITY_AC97_BASE + 0x000C)
9-
#define PKUNITY_AC97_INTR __REG(PKUNITY_AC97_BASE + 0x0010)
10-
#define PKUNITY_AC97_INTRSTAT __REG(PKUNITY_AC97_BASE + 0x0014)
11-
#define PKUNITY_AC97_INTRCLEAR __REG(PKUNITY_AC97_BASE + 0x0018)
12-
#define PKUNITY_AC97_ENABLE __REG(PKUNITY_AC97_BASE + 0x001C)
13-
#define PKUNITY_AC97_OUT_FIFO __REG(PKUNITY_AC97_BASE + 0x0020)
14-
#define PKUNITY_AC97_IN_FIFO __REG(PKUNITY_AC97_BASE + 0x0030)
5+
#define PKUNITY_AC97_CONR (PKUNITY_AC97_BASE + 0x0000)
6+
#define PKUNITY_AC97_OCR (PKUNITY_AC97_BASE + 0x0004)
7+
#define PKUNITY_AC97_ICR (PKUNITY_AC97_BASE + 0x0008)
8+
#define PKUNITY_AC97_CRAC (PKUNITY_AC97_BASE + 0x000C)
9+
#define PKUNITY_AC97_INTR (PKUNITY_AC97_BASE + 0x0010)
10+
#define PKUNITY_AC97_INTRSTAT (PKUNITY_AC97_BASE + 0x0014)
11+
#define PKUNITY_AC97_INTRCLEAR (PKUNITY_AC97_BASE + 0x0018)
12+
#define PKUNITY_AC97_ENABLE (PKUNITY_AC97_BASE + 0x001C)
13+
#define PKUNITY_AC97_OUT_FIFO (PKUNITY_AC97_BASE + 0x0020)
14+
#define PKUNITY_AC97_IN_FIFO (PKUNITY_AC97_BASE + 0x0030)
1515

1616
#define AC97_CODEC_REG(v) FIELD((v), 7, 16)
1717
#define AC97_CODEC_VAL(v) FIELD((v), 16, 0)

‎arch/unicore32/include/mach/regs-dmac.h‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,27 @@
55
/*
66
* Interrupt Status Reg DMAC_ISR.
77
*/
8-
#define DMAC_ISR __REG(PKUNITY_DMAC_BASE + 0x0020)
8+
#define DMAC_ISR (PKUNITY_DMAC_BASE + 0x0020)
99
/*
1010
* Interrupt Transfer Complete Status Reg DMAC_ITCSR.
1111
*/
12-
#define DMAC_ITCSR __REG(PKUNITY_DMAC_BASE + 0x0050)
12+
#define DMAC_ITCSR (PKUNITY_DMAC_BASE + 0x0050)
1313
/*
1414
* Interrupt Transfer Complete Clear Reg DMAC_ITCCR.
1515
*/
16-
#define DMAC_ITCCR __REG(PKUNITY_DMAC_BASE + 0x0060)
16+
#define DMAC_ITCCR (PKUNITY_DMAC_BASE + 0x0060)
1717
/*
1818
* Interrupt Error Status Reg DMAC_IESR.
1919
*/
20-
#define DMAC_IESR __REG(PKUNITY_DMAC_BASE + 0x0080)
20+
#define DMAC_IESR (PKUNITY_DMAC_BASE + 0x0080)
2121
/*
2222
* Interrupt Error Clear Reg DMAC_IECR.
2323
*/
24-
#define DMAC_IECR __REG(PKUNITY_DMAC_BASE + 0x0090)
24+
#define DMAC_IECR (PKUNITY_DMAC_BASE + 0x0090)
2525
/*
2626
* Enable Channels Reg DMAC_ENCH.
2727
*/
28-
#define DMAC_ENCH __REG(PKUNITY_DMAC_BASE + 0x00B0)
28+
#define DMAC_ENCH (PKUNITY_DMAC_BASE + 0x00B0)
2929

3030
/*
3131
* DMA control reg. Space [byte]
@@ -35,19 +35,19 @@
3535
/*
3636
* Source Addr DMAC_SRCADDR(ch).
3737
*/
38-
#define DMAC_SRCADDR(ch) __REG(PKUNITY_DMAC_BASE + (ch)*DMASp + 0x00)
38+
#define DMAC_SRCADDR(ch) (PKUNITY_DMAC_BASE + (ch)*DMASp + 0x00)
3939
/*
4040
* Destination Addr DMAC_DESTADDR(ch).
4141
*/
42-
#define DMAC_DESTADDR(ch) __REG(PKUNITY_DMAC_BASE + (ch)*DMASp + 0x04)
42+
#define DMAC_DESTADDR(ch) (PKUNITY_DMAC_BASE + (ch)*DMASp + 0x04)
4343
/*
4444
* Control Reg DMAC_CONTROL(ch).
4545
*/
46-
#define DMAC_CONTROL(ch) __REG(PKUNITY_DMAC_BASE + (ch)*DMASp + 0x0C)
46+
#define DMAC_CONTROL(ch) (PKUNITY_DMAC_BASE + (ch)*DMASp + 0x0C)
4747
/*
4848
* Configuration Reg DMAC_CONFIG(ch).
4949
*/
50-
#define DMAC_CONFIG(ch) __REG(PKUNITY_DMAC_BASE + (ch)*DMASp + 0x10)
50+
#define DMAC_CONFIG(ch) (PKUNITY_DMAC_BASE + (ch)*DMASp + 0x10)
5151

5252
#define DMAC_IR_MASK FMASK(6, 0)
5353
/*

‎arch/unicore32/include/mach/regs-gpio.h‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,35 +5,35 @@
55
/*
66
* Voltage Status Reg GPIO_GPLR.
77
*/
8-
#define GPIO_GPLR __REG(PKUNITY_GPIO_BASE + 0x0000)
8+
#define GPIO_GPLR (PKUNITY_GPIO_BASE + 0x0000)
99
/*
1010
* Pin Direction Reg GPIO_GPDR.
1111
*/
12-
#define GPIO_GPDR __REG(PKUNITY_GPIO_BASE + 0x0004)
12+
#define GPIO_GPDR (PKUNITY_GPIO_BASE + 0x0004)
1313
/*
1414
* Output Pin Set Reg GPIO_GPSR.
1515
*/
16-
#define GPIO_GPSR __REG(PKUNITY_GPIO_BASE + 0x0008)
16+
#define GPIO_GPSR (PKUNITY_GPIO_BASE + 0x0008)
1717
/*
1818
* Output Pin Clear Reg GPIO_GPCR.
1919
*/
20-
#define GPIO_GPCR __REG(PKUNITY_GPIO_BASE + 0x000C)
20+
#define GPIO_GPCR (PKUNITY_GPIO_BASE + 0x000C)
2121
/*
2222
* Raise Edge Detect Reg GPIO_GRER.
2323
*/
24-
#define GPIO_GRER __REG(PKUNITY_GPIO_BASE + 0x0010)
24+
#define GPIO_GRER (PKUNITY_GPIO_BASE + 0x0010)
2525
/*
2626
* Fall Edge Detect Reg GPIO_GFER.
2727
*/
28-
#define GPIO_GFER __REG(PKUNITY_GPIO_BASE + 0x0014)
28+
#define GPIO_GFER (PKUNITY_GPIO_BASE + 0x0014)
2929
/*
3030
* Edge Status Reg GPIO_GEDR.
3131
*/
32-
#define GPIO_GEDR __REG(PKUNITY_GPIO_BASE + 0x0018)
32+
#define GPIO_GEDR (PKUNITY_GPIO_BASE + 0x0018)
3333
/*
3434
* Sepcial Voltage Detect Reg GPIO_GPIR.
3535
*/
36-
#define GPIO_GPIR __REG(PKUNITY_GPIO_BASE + 0x0020)
36+
#define GPIO_GPIR (PKUNITY_GPIO_BASE + 0x0020)
3737

3838
#define GPIO_MIN (0)
3939
#define GPIO_MAX (27)

‎arch/unicore32/include/mach/regs-i2c.h‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,35 +5,35 @@
55
/*
66
* Control Reg I2C_CON.
77
*/
8-
#define I2C_CON __REG(PKUNITY_I2C_BASE + 0x0000)
8+
#define I2C_CON (PKUNITY_I2C_BASE + 0x0000)
99
/*
1010
* Target Address Reg I2C_TAR.
1111
*/
12-
#define I2C_TAR __REG(PKUNITY_I2C_BASE + 0x0004)
12+
#define I2C_TAR (PKUNITY_I2C_BASE + 0x0004)
1313
/*
1414
* Data buffer and command Reg I2C_DATACMD.
1515
*/
16-
#define I2C_DATACMD __REG(PKUNITY_I2C_BASE + 0x0010)
16+
#define I2C_DATACMD (PKUNITY_I2C_BASE + 0x0010)
1717
/*
1818
* Enable Reg I2C_ENABLE.
1919
*/
20-
#define I2C_ENABLE __REG(PKUNITY_I2C_BASE + 0x006C)
20+
#define I2C_ENABLE (PKUNITY_I2C_BASE + 0x006C)
2121
/*
2222
* Status Reg I2C_STATUS.
2323
*/
24-
#define I2C_STATUS __REG(PKUNITY_I2C_BASE + 0x0070)
24+
#define I2C_STATUS (PKUNITY_I2C_BASE + 0x0070)
2525
/*
2626
* Tx FIFO Length Reg I2C_TXFLR.
2727
*/
28-
#define I2C_TXFLR __REG(PKUNITY_I2C_BASE + 0x0074)
28+
#define I2C_TXFLR (PKUNITY_I2C_BASE + 0x0074)
2929
/*
3030
* Rx FIFO Length Reg I2C_RXFLR.
3131
*/
32-
#define I2C_RXFLR __REG(PKUNITY_I2C_BASE + 0x0078)
32+
#define I2C_RXFLR (PKUNITY_I2C_BASE + 0x0078)
3333
/*
3434
* Enable Status Reg I2C_ENSTATUS.
3535
*/
36-
#define I2C_ENSTATUS __REG(PKUNITY_I2C_BASE + 0x009C)
36+
#define I2C_ENSTATUS (PKUNITY_I2C_BASE + 0x009C)
3737

3838
#define I2C_CON_MASTER FIELD(1, 1, 0)
3939
#define I2C_CON_SPEED_STD FIELD(1, 2, 1)

‎arch/unicore32/include/mach/regs-intc.h‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,25 @@
44
/*
55
* INTC Level Reg INTC_ICLR.
66
*/
7-
#define INTC_ICLR __REG(PKUNITY_INTC_BASE + 0x0000)
7+
#define INTC_ICLR (PKUNITY_INTC_BASE + 0x0000)
88
/*
99
* INTC Mask Reg INTC_ICMR.
1010
*/
11-
#define INTC_ICMR __REG(PKUNITY_INTC_BASE + 0x0004)
11+
#define INTC_ICMR (PKUNITY_INTC_BASE + 0x0004)
1212
/*
1313
* INTC Pending Reg INTC_ICPR.
1414
*/
15-
#define INTC_ICPR __REG(PKUNITY_INTC_BASE + 0x0008)
15+
#define INTC_ICPR (PKUNITY_INTC_BASE + 0x0008)
1616
/*
1717
* INTC IRQ Pending Reg INTC_ICIP.
1818
*/
19-
#define INTC_ICIP __REG(PKUNITY_INTC_BASE + 0x000C)
19+
#define INTC_ICIP (PKUNITY_INTC_BASE + 0x000C)
2020
/*
2121
* INTC REAL Pending Reg INTC_ICFP.
2222
*/
23-
#define INTC_ICFP __REG(PKUNITY_INTC_BASE + 0x0010)
23+
#define INTC_ICFP (PKUNITY_INTC_BASE + 0x0010)
2424
/*
2525
* INTC Control Reg INTC_ICCR.
2626
*/
27-
#define INTC_ICCR __REG(PKUNITY_INTC_BASE + 0x0014)
27+
#define INTC_ICCR (PKUNITY_INTC_BASE + 0x0014)
2828

0 commit comments

Comments
 (0)