remove all HAL_*_READ/WRITE defines 57/head
authorOleksij Rempel <linux@rempel-privat.de>
Fri, 23 May 2014 16:36:16 +0000 (18:36 +0200)
committerOleksij Rempel <linux@rempel-privat.de>
Fri, 23 May 2014 16:36:16 +0000 (18:36 +0200)
we do not need them any more

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
target_firmware/magpie_fw_dev/target/inc/k2/k2/reg_defs.h
target_firmware/magpie_fw_dev/target/inc/k2/uart_api.h
target_firmware/magpie_fw_dev/target/inc/magpie/magpie/reg_defs.h
target_firmware/magpie_fw_dev/target/inc/magpie/uart_api.h
target_firmware/magpie_fw_dev/target/inc/usb_defs.h

index a8fd478c13e61dc353602162a4a547d3d41622f0..12e160f8ece88c74fa88032bc43401a6a32b60f2 100755 (executable)
 #define BIT_SET(bit)   (1<<bit)
 #define BIT_CLR(bit)   (0<<bit)
 
-#define HAL_WORD_REG_WRITE(addr, val)                                  \
-       do {                                                            \
-               (*((volatile uint32_t *)(addr&0xfffffffc))) = (uint32_t)(val); \
-       } while (0)
-
-#define HAL_WORD_REG_READ(addr) (*((volatile uint32_t *)(addr&0xfffffffc)))
-
-
-#define HAL_HALF_WORD_REG_WRITE(addr, val)                             \
-       do {                                                            \
-               (*((volatile uint16_t *)(addr&0xfffffffe))) = (uint16_t)(val); \
-       } while (0)
-
-#define HAL_HALF_WORD_REG_READ(addr) (*((volatile uint16_t *)(addr&0xfffffffe))) 
-
-
-#define HAL_BYTE_REG_WRITE(addr, val)                                  \
-       do {                                                            \
-               (*((volatile uint8_t *)(addr))) = (uint8_t)(val);       \
-       } while (0)
-
-#define HAL_BYTE_REG_READ(addr) (*((volatile uint8_t *)(addr))) 
-
 /***** REGISTER BASE ADDRESS DEFINITION *****/
 #define RESET_VECTOR_ADDRESS        0x8e0000
 /********************************************/
index a455957283f4d5c61a02f44945c42ad245b29c41..b30c7b5827fecc689c577bea2f9ecbc02322fd7f 100755 (executable)
 
 #include "k2/reg_defs.h"
 
-/************************* Register Process marco ************************/
-#define UART_REG_WRITE(addr, val)       HAL_WORD_REG_WRITE(UART_BASE_ADDRESS|(uint32_t)(addr), (val))
-#define UART_REG_READ(addr)             HAL_WORD_REG_READ(UART_BASE_ADDRESS|(uint32_t)(addr))
-
 /************************** Register deinition ***************************/
 #define RBR_ADDRESS                              0x00051000
 #define RBR_OFFSET                               0x00000000
index 378a13dd29d84eb03e7335ae235b523bc02090d9..11ad6494ceca98de9e887b19208d9897394bfbf9 100755 (executable)
 #define BIT_SET(bit)   (1<<bit)\r
 #define BIT_CLR(bit)   (0<<bit)\r
 \r
-#define HAL_WORD_REG_WRITE(addr, val)                                              \\r
-    do {                                                                            \\r
-        (*((volatile uint32_t *)(addr&0xfffffffc))) = (uint32_t)(val);              \\r
-    } while (0)\r
-\r
-#define HAL_WORD_REG_READ(addr) (*((volatile uint32_t *)(addr&0xfffffffc)))\r
-\r
-\r
-#define HAL_HALF_WORD_REG_WRITE(addr, val)                                              \\r
-    do {                                                                            \\r
-        (*((volatile uint16_t *)(addr&0xfffffffe))) = (uint16_t)(val);    \\r
-    } while (0)\r
-\r
-#define HAL_HALF_WORD_REG_READ(addr) (*((volatile uint16_t *)(addr&0xfffffffe))) \r
-\r
-\r
-#define HAL_BYTE_REG_WRITE(addr, val)                                               \\r
-    do {                                                                            \\r
-        (*((volatile uint8_t *)(addr))) = (uint8_t)(val);                           \\r
-    } while (0)\r
-\r
-#define HAL_BYTE_REG_READ(addr) (*((volatile uint8_t *)(addr))) \r
-\r
 /***** REGISTER BASE ADDRESS DEFINITION *****/\r
 #define RESET_VECTOR_ADDRESS        0x8e0000\r
 /********************************************/\r
index b13f362ca46d25b2e09f950a0713a8c0d95736b2..3492a1d534b417709d6d5c0b8a3e4f32a05f6c1d 100755 (executable)
 
 #include "reg_defs.h"
 
-/************************* Register Process marco ************************/
-#define UART_REG_WRITE(addr, val)       HAL_WORD_REG_WRITE(UART_BASE_ADDRESS|(uint32_t)(addr), (val))
-#define UART_REG_READ(addr)             HAL_WORD_REG_READ(UART_BASE_ADDRESS|(uint32_t)(addr))
-
 /************************** Register deinition ***************************/
 #define RBR_ADDRESS                              0x00051000
 #define RBR_OFFSET                               0x00000000
index 109071a20ed7d960ce9fe5dfccb25f604f68e912..2d0af6948bf3e53cb708cfaee05e5d01d27431b4 100755 (executable)
 #define mADDR(addr)                                            (*mpADDR(addr))
 #define muADDR(addr)                                           ((uint16_t) (&(addr)))
 
-#define USB_BYTE_REG_WRITE(addr, val)          HAL_BYTE_REG_WRITE(USB_CTRL_BASE_ADDRESS|(uint8_t)(addr^3), (val))
-#define USB_BYTE_REG_READ(addr)                HAL_BYTE_REG_READ(USB_CTRL_BASE_ADDRESS|(uint8_t)(addr^3))
-//#define USB_BYTE_REG_READ(addr)              HAL_BYTE_REG_READ(USB_CTRL_BASE_ADDRESS|(uint8_t)(addr))
+#define USB_BYTE_REG_WRITE(addr, val)          iowrite8_usb(addr, val)
+#define USB_BYTE_REG_READ(addr)                        ioread8_usb(addr)
 
-#define USB_HALF_WORD_REG_WRITE(addr, val)      HAL_HALF_WORD_REG_WRITE(USB_CTRL_BASE_ADDRESS|(uint16_t)(addr), (val))
-#define USB_HALF_WORD_REG_READ(addr)            HAL_HALF_WORD_REG_READ(USB_CTRL_BASE_ADDRESS|(uint16_t)(addr))
+#define USB_HALF_WORD_REG_WRITE(addr, val)     iowrite16_usb(addr, val)
+#define USB_HALF_WORD_REG_READ(addr)           ioread16_usb(addr)
 
-#define USB_WORD_REG_WRITE(addr, val)          HAL_WORD_REG_WRITE(USB_CTRL_BASE_ADDRESS|(uint32_t)(addr), (val))
-#define USB_WORD_REG_READ(addr)                HAL_WORD_REG_READ(USB_CTRL_BASE_ADDRESS|(uint32_t)(addr))
+#define USB_WORD_REG_WRITE(addr, val)          iowrite32_usb(addr, val)
+#define USB_WORD_REG_READ(addr)                        ioread32_usb(addr)
 
 
 /************************** Register Deinition ***************************/