43 #define NETUP_DATA 0x000000ff
44 #define NETUP_WR 0x00008000
45 #define NETUP_RD 0x00004000
46 #define NETUP_ACK 0x00001000
47 #define NETUP_ADHI 0x00000800
48 #define NETUP_ADLO 0x00000400
49 #define NETUP_CS1 0x00000200
50 #define NETUP_CS0 0x00000100
51 #define NETUP_EN_ALL 0x00001000
52 #define NETUP_CTRL_OFF (NETUP_CS1 | NETUP_CS0 | NETUP_WR | NETUP_RD)
53 #define NETUP_CI_CTL 0x04
56 #define NETUP_IRQ_DETAM 0x1
57 #define NETUP_IRQ_IRQAM 0x4
59 static unsigned int ci_dbg;
63 static unsigned int ci_irq_enable;
67 #define ci_dbg_print(args...) \
70 printk(KERN_DEBUG args); \
73 #define ci_irq_flags() (ci_irq_enable ? NETUP_IRQ_IRQAM : 0)
111 ci_dbg_print(
"%s: i2c read error, Reg = 0x%02x, Status = %d\n",
117 ci_dbg_print(
"%s: i2c read Addr=0x%04x, Reg = 0x%02x, data = %02x\n",
118 __func__, addr, reg, buf[0]);
137 memcpy(&buffer[1], buf, len);
142 ci_dbg_print(
"%s: i2c write error, Reg=[0x%02x], Status=%d\n",
228 ci_dbg_print(
"%s: %s: chipaddr=[0x%x] addr=[0x%02x], %s=%x\n", __func__,
229 (read) ?
"read" :
"write", state->
ci_i2c_addr, addr,
231 (read) ? mem : data);
306 ci_dbg_print(
"%s: chipaddr=[0x%x] setting ci IRQ to [0x%x] \n",
360 "Reg=[0x%02x], data=%02x, "
361 "TS config = %02x\n", __func__,
418 u8 cimax_init[34] = {
459 ci_dbg_print(
"%s: Unable create CI structure!\n", __func__);
490 0, &cimax_init[0], 34);
493 0x1f, &cimax_init[0x18], 1);
496 0x18, &cimax_init[0x18], 1);
515 ci_dbg_print(
"%s: Cannot initialize CI: Error %d.\n", __func__, ret);
531 if (
NULL == state->
ca.data)