diff options
author | Alan Cox <alan@linux.intel.com> | 2009-08-06 20:45:24 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-09-15 12:02:12 -0700 |
commit | 79de99e864fb731392bec78f251ce0310fed5d9a (patch) | |
tree | baab22d5f5dac0feaf578686fb0344dca9d344ce /drivers/staging/sep/sep_driver_config.h | |
parent | f5e3980f9b28b703bc009af9dfa33ae2236503da (diff) |
Staging: sep: rework write_register/read_register
Replace the macros with an inline to get type safety and pass sep_dev
instead of the reg pointer
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/sep/sep_driver_config.h')
-rw-r--r-- | drivers/staging/sep/sep_driver_config.h | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/drivers/staging/sep/sep_driver_config.h b/drivers/staging/sep/sep_driver_config.h index 48f159179a1..8a4d27a435e 100644 --- a/drivers/staging/sep/sep_driver_config.h +++ b/drivers/staging/sep/sep_driver_config.h @@ -244,62 +244,6 @@ do { \ printk(KERN_WARNING info, param1, param2, param3, param4); \ } while (0) -#if 0 -/* write register macro with option for debug print */ -#define SEP_WRITE_REGISTER(address, value) \ -do { \ - if (sepDebug & SEP_DEBUG_LEVEL_REGISTERS) \ - printk(KERN_WARNING "Write Register: address %lu value %lu\n", \ - (unsigned long)(address), (unsigned long)(value)); \ - writel((value), (void *)(address)); \ -} while (0) - -/* read register macro with option for debug print */ -#define SEP_READ_REGISTER(address , value) \ -do { \ - (value) = readl((void *)(address)); \ - if (sepDebug & SEP_DEBUG_LEVEL_REGISTERS) \ - printk(KERN_WARNING "Read Register: address %lu value %lu\n", \ - (address), (value)); \ -} while (0) -#else - -#if 1 - -#define SEP_WRITE_REGISTER(address, value) writel((value), (void *)(address)) -#define SEP_READ_REGISTER(address, value) (value) = readl((void *)(address)) -#endif - -#endif - -#if 0 -#define SEP_WRITE_ROM(address, value) writel((value), (void *)(address)) -#define SEP_WRITE_REGISTER(address, value) \ -do { \ - unsigned long i; \ - for (i = 0; i < 1000; i++); \ - writel((value), (void *)(address)); \ -} while (0) - - -#define SEP_READ_REGISTER(address , value) \ -do { \ - unsigned long i; \ - for (i = 0; i < 1000; i++); \ - (value) = readl((void *) (address)); \ -} while (0) - -#endif - -/* wait for SRAM write complete(indirect write */ -#define SEP_WAIT_SRAM_WRITE_COMPLETE() \ -do { \ - unsigned long reg_val; \ - do { \ - SEP_READ_REGISTER(sep_dev->reg_base_address + \ - HW_SRAM_DATA_READY_REG_ADDR, (reg_val)); \ - } while (!(reg_val & 0x1)); \ -} while (0) #endif |