static int load_cyc2x(struct cycx_hw *hw, struct cycx_firmware *cfm, u32 len);
static void cycx_bootcfg(struct cycx_hw *hw);
-static int reset_cyc2x(void *addr);
-static int detect_cyc2x(void *addr);
+static int reset_cyc2x(void __iomem *addr);
+static int detect_cyc2x(void __iomem *addr);
/* Miscellaneous functions */
static void delay_cycx(int sec);
* Return: 0 ok.
* < 0 error */
EXPORT_SYMBOL(cycx_setup);
-int cycx_setup(struct cycx_hw *hw, void *cfm, u32 len)
+int cycx_setup(struct cycx_hw *hw, void *cfm, u32 len, unsigned long dpmbase)
{
- long dpmbase = (long)hw->dpmbase;
int err;
/* Verify IRQ configuration options */
* o Set exec flag.
* o Busy-wait until flag is reset. */
EXPORT_SYMBOL(cycx_exec);
-int cycx_exec(void *addr)
+int cycx_exec(void __iomem *addr)
{
u16 i = 0;
/* wait till addr content is zeroed */
/* Load Aux Routines */
/* Reset board hardware.
return 1 if memory exists at addr and 0 if not. */
-static int memory_exists(void *addr)
+static int memory_exists(void __iomem *addr)
{
int tries = 0;
}
/* Load reset code. */
-static void reset_load(void *addr, u8 *buffer, u32 cnt)
+static void reset_load(void __iomem *addr, u8 *buffer, u32 cnt)
{
- void *pt_code = addr + RESET_OFFSET;
+ void __iomem *pt_code = addr + RESET_OFFSET;
u16 i; /*, j; */
for (i = 0 ; i < cnt ; i++) {
/* Load buffer using boot interface.
* o copy data from buffer to Cyclom-X memory
* o wait for reset code to copy it to right portion of memory */
-static int buffer_load(void *addr, u8 *buffer, u32 cnt)
+static int buffer_load(void __iomem *addr, u8 *buffer, u32 cnt)
{
memcpy_toio(addr + DATA_OFFSET, buffer, cnt);
writew(GEN_BOOT_DAT, addr + CMD_OFFSET);
}
/* Set up entry point and kick start Cyclom-X CPU. */
-static void cycx_start(void *addr)
+static void cycx_start(void __iomem *addr)
{
/* put in 0x30 offset the jump instruction to the code entry point */
writeb(0xea, addr + 0x30);
}
/* Load and boot reset code. */
-static void cycx_reset_boot(void *addr, u8 *code, u32 len)
+static void cycx_reset_boot(void __iomem *addr, u8 *code, u32 len)
{
- void *pt_start = addr + START_OFFSET;
+ void __iomem *pt_start = addr + START_OFFSET;
writeb(0xea, pt_start++); /* jmp to f000:3f00 */
writeb(0x00, pt_start++);
}
/* Load data.bin file through boot (reset) interface. */
-static int cycx_data_boot(void *addr, u8 *code, u32 len)
+static int cycx_data_boot(void __iomem *addr, u8 *code, u32 len)
{
- void *pt_boot_cmd = addr + CMD_OFFSET;
+ void __iomem *pt_boot_cmd = addr + CMD_OFFSET;
u32 i;
/* boot buffer lenght */
/* Load code.bin file through boot (reset) interface. */
-static int cycx_code_boot(void *addr, u8 *code, u32 len)
+static int cycx_code_boot(void __iomem *addr, u8 *code, u32 len)
{
- void *pt_boot_cmd = addr + CMD_OFFSET;
+ void __iomem *pt_boot_cmd = addr + CMD_OFFSET;
u32 i;
/* boot buffer lenght */
u8 *reset_image,
*data_image,
*code_image;
- void *pt_cycld = hw->dpmbase + 0x400;
+ void __iomem *pt_cycld = hw->dpmbase + 0x400;
u16 cksum;
/* Announce */
* Return 1 if detected o.k. or 0 if failed.
* Note: This test is destructive! Adapter will be left in shutdown
* state after the test. */
-static int detect_cyc2x(void *addr)
+static int detect_cyc2x(void __iomem *addr)
{
reset_cyc2x(addr);
}
/* Reset adapter's CPU. */
-static int reset_cyc2x(void *addr)
+static int reset_cyc2x(void __iomem *addr)
{
writeb(0, addr + RST_ENABLE);
delay_cycx(2);