aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorManu Abraham <abraham.manu@gmail.com>2009-12-04 03:12:16 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-01-17 08:55:35 -0500
commit2133ffbf08e7fca0614ea73cb5c43cc6435b4414 (patch)
tree0328843ebd577c7d9e9ebf5e86808df269634e11 /drivers/media
parent4e9fbeeedc22d287b5d05e32bbc647cd2dc8c663 (diff)
V4L/DVB (13745): [Mantis CA] Add some debug statements
Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/dvb/mantis/mantis_ca.c34
-rw-r--r--drivers/media/dvb/mantis/mantis_hif.c4
2 files changed, 38 insertions, 0 deletions
diff --git a/drivers/media/dvb/mantis/mantis_ca.c b/drivers/media/dvb/mantis/mantis_ca.c
index cd6bed737296..a8b8c88238e0 100644
--- a/drivers/media/dvb/mantis/mantis_ca.c
+++ b/drivers/media/dvb/mantis/mantis_ca.c
@@ -25,6 +25,9 @@
25static int mantis_ca_read_attr_mem(struct dvb_ca_en50221 *en50221, int slot, int addr) 25static int mantis_ca_read_attr_mem(struct dvb_ca_en50221 *en50221, int slot, int addr)
26{ 26{
27 struct mantis_ca *ca = en50221->data; 27 struct mantis_ca *ca = en50221->data;
28 struct mantis_pci *mantis = ca->ca_priv;
29
30 dprintk(verbose, MANTIS_DEBUG, 1, "Slot(%d): Request Attribute Mem Read", slot);
28 31
29 if (slot != 0) 32 if (slot != 0)
30 return -EINVAL; 33 return -EINVAL;
@@ -35,6 +38,9 @@ static int mantis_ca_read_attr_mem(struct dvb_ca_en50221 *en50221, int slot, int
35static int mantis_ca_write_attr_mem(struct dvb_ca_en50221 *en50221, int slot, int addr, u8 data) 38static int mantis_ca_write_attr_mem(struct dvb_ca_en50221 *en50221, int slot, int addr, u8 data)
36{ 39{
37 struct mantis_ca *ca = en50221->data; 40 struct mantis_ca *ca = en50221->data;
41 struct mantis_pci *mantis = ca->ca_priv;
42
43 dprintk(verbose, MANTIS_DEBUG, 1, "Slot(%d): Request Attribute Mem Write", slot);
38 44
39 if (slot != 0) 45 if (slot != 0)
40 return -EINVAL; 46 return -EINVAL;
@@ -45,6 +51,9 @@ static int mantis_ca_write_attr_mem(struct dvb_ca_en50221 *en50221, int slot, in
45static int mantis_ca_read_cam_ctl(struct dvb_ca_en50221 *en50221, int slot, u8 addr) 51static int mantis_ca_read_cam_ctl(struct dvb_ca_en50221 *en50221, int slot, u8 addr)
46{ 52{
47 struct mantis_ca *ca = en50221->data; 53 struct mantis_ca *ca = en50221->data;
54 struct mantis_pci *mantis = ca->ca_priv;
55
56 dprintk(verbose, MANTIS_DEBUG, 1, "Slot(%d): Request CAM control Read", slot);
48 57
49 if (slot != 0) 58 if (slot != 0)
50 return -EINVAL; 59 return -EINVAL;
@@ -55,6 +64,9 @@ static int mantis_ca_read_cam_ctl(struct dvb_ca_en50221 *en50221, int slot, u8 a
55static int mantis_ca_write_cam_ctl(struct dvb_ca_en50221 *en50221, int slot, u8 addr, u8 data) 64static int mantis_ca_write_cam_ctl(struct dvb_ca_en50221 *en50221, int slot, u8 addr, u8 data)
56{ 65{
57 struct mantis_ca *ca = en50221->data; 66 struct mantis_ca *ca = en50221->data;
67 struct mantis_pci *mantis = ca->ca_priv;
68
69 dprintk(verbose, MANTIS_DEBUG, 1, "Slot(%d): Request CAM control Write", slot);
58 70
59 if (slot != 0) 71 if (slot != 0)
60 return -EINVAL; 72 return -EINVAL;
@@ -64,22 +76,40 @@ static int mantis_ca_write_cam_ctl(struct dvb_ca_en50221 *en50221, int slot, u8
64 76
65static int mantis_ca_slot_reset(struct dvb_ca_en50221 *en50221, int slot) 77static int mantis_ca_slot_reset(struct dvb_ca_en50221 *en50221, int slot)
66{ 78{
79 struct mantis_ca *ca = en50221->data;
80 struct mantis_pci *mantis = ca->ca_priv;
81
82 dprintk(verbose, MANTIS_DEBUG, 1, "Slot(%d): Slot RESET", slot);
83
67 return 0; 84 return 0;
68} 85}
69 86
70static int mantis_ca_slot_shutdown(struct dvb_ca_en50221 *en50221, int slot) 87static int mantis_ca_slot_shutdown(struct dvb_ca_en50221 *en50221, int slot)
71{ 88{
89 struct mantis_ca *ca = en50221->data;
90 struct mantis_pci *mantis = ca->ca_priv;
91
92 dprintk(verbose, MANTIS_DEBUG, 1, "Slot(%d): Slot shutdown", slot);
93
72 return 0; 94 return 0;
73} 95}
74 96
75static int mantis_ts_control(struct dvb_ca_en50221 *en50221, int slot) 97static int mantis_ts_control(struct dvb_ca_en50221 *en50221, int slot)
76{ 98{
99 struct mantis_ca *ca = en50221->data;
100 struct mantis_pci *mantis = ca->ca_priv;
101
102 dprintk(verbose, MANTIS_DEBUG, 1, "Slot(%d): TS control", slot);
103
77 return 0; 104 return 0;
78} 105}
79 106
80static int mantis_slot_status(struct dvb_ca_en50221 *en50221, int slot, int open) 107static int mantis_slot_status(struct dvb_ca_en50221 *en50221, int slot, int open)
81{ 108{
82 struct mantis_ca *ca = en50221->data; 109 struct mantis_ca *ca = en50221->data;
110 struct mantis_pci *mantis = ca->ca_priv;
111
112 dprintk(verbose, MANTIS_DEBUG, 1, "Slot(%d): Poll Slot status", slot);
83 113
84 if (ca->slot_state == MODULE_INSERTED) 114 if (ca->slot_state == MODULE_INSERTED)
85 return DVB_CA_EN50221_POLL_CAM_PRESENT | DVB_CA_EN50221_POLL_CAM_READY; 115 return DVB_CA_EN50221_POLL_CAM_PRESENT | DVB_CA_EN50221_POLL_CAM_READY;
@@ -93,6 +123,7 @@ int mantis_ca_init(struct mantis_pci *mantis)
93 struct mantis_ca *ca; 123 struct mantis_ca *ca;
94 int ca_flags = 0, result; 124 int ca_flags = 0, result;
95 125
126 dprintk(verbose, MANTIS_DEBUG, 1, "Initializing Mantis CA");
96 if (!(ca = kzalloc(sizeof (struct mantis_ca), GFP_KERNEL))) { 127 if (!(ca = kzalloc(sizeof (struct mantis_ca), GFP_KERNEL))) {
97 dprintk(verbose, MANTIS_ERROR, 1, "Out of memory!, exiting .."); 128 dprintk(verbose, MANTIS_ERROR, 1, "Out of memory!, exiting ..");
98 result = -ENOMEM; 129 result = -ENOMEM;
@@ -130,6 +161,9 @@ err:
130void mantis_ca_exit(struct mantis_pci *mantis) 161void mantis_ca_exit(struct mantis_pci *mantis)
131{ 162{
132 struct mantis_ca *ca = mantis->mantis_ca; 163 struct mantis_ca *ca = mantis->mantis_ca;
164 struct mantis_pci *mantis = ca->ca_priv;
165
166 dprintk(verbose, MANTIS_DEBUG, 1, "Mantis CA exit");
133 167
134 mantis_evmgr_exit(ca); 168 mantis_evmgr_exit(ca);
135 dprintk(verbose, MANTIS_ERROR, 1, "Unregistering EN50221 device"); 169 dprintk(verbose, MANTIS_ERROR, 1, "Unregistering EN50221 device");
diff --git a/drivers/media/dvb/mantis/mantis_hif.c b/drivers/media/dvb/mantis/mantis_hif.c
index 6a1ea96c16d9..42e0360e96d9 100644
--- a/drivers/media/dvb/mantis/mantis_hif.c
+++ b/drivers/media/dvb/mantis/mantis_hif.c
@@ -61,6 +61,7 @@ int mantis_hif_read_mem(struct mantis_ca *ca, u32 addr)
61 struct mantis_pci *mantis = ca->ca_priv; 61 struct mantis_pci *mantis = ca->ca_priv;
62 u32 hif_addr = 0, data, count = 4; 62 u32 hif_addr = 0, data, count = 4;
63 63
64 dprintk(verbose, MANTIS_DEBUG, 1, "Adapter(%d) Slot(0): Request HIF Mem Read", mantis->num);
64 hif_addr |= MANTIS_GPIF_HIFRDWRN; 65 hif_addr |= MANTIS_GPIF_HIFRDWRN;
65 hif_addr &= ~MANTIS_GPIF_PCMCIAREG; 66 hif_addr &= ~MANTIS_GPIF_PCMCIAREG;
66 hif_addr &= ~MANTIS_GPIF_PCMCIAIOM; 67 hif_addr &= ~MANTIS_GPIF_PCMCIAIOM;
@@ -91,6 +92,7 @@ int mantis_hif_write_mem(struct mantis_ca *ca, u32 addr, u8 data)
91 struct mantis_pci *mantis = ca->ca_priv; 92 struct mantis_pci *mantis = ca->ca_priv;
92 u32 hif_addr = 0; 93 u32 hif_addr = 0;
93 94
95 dprintk(verbose, MANTIS_DEBUG, 1, "Adapter(%d) Slot(0): Request HIF Mem Write", mantis->num);
94 hif_addr &= ~MANTIS_GPIF_HIFRDWRN; 96 hif_addr &= ~MANTIS_GPIF_HIFRDWRN;
95 hif_addr &= ~MANTIS_GPIF_PCMCIAREG; 97 hif_addr &= ~MANTIS_GPIF_PCMCIAREG;
96 hif_addr &= ~MANTIS_GPIF_PCMCIAIOM; 98 hif_addr &= ~MANTIS_GPIF_PCMCIAIOM;
@@ -116,6 +118,7 @@ int mantis_hif_read_iom(struct mantis_ca *ca, u32 addr)
116 struct mantis_pci *mantis = ca->ca_priv; 118 struct mantis_pci *mantis = ca->ca_priv;
117 u32 data, hif_addr = 0; 119 u32 data, hif_addr = 0;
118 120
121 dprintk(verbose, MANTIS_DEBUG, 1, "Adapter(%d) Slot(0): Request HIF I/O Read", mantis->num);
119 hif_addr &= ~MANTIS_GPIF_PCMCIAREG; 122 hif_addr &= ~MANTIS_GPIF_PCMCIAREG;
120 hif_addr |= MANTIS_GPIF_HIFRDWRN; 123 hif_addr |= MANTIS_GPIF_HIFRDWRN;
121 hif_addr |= MANTIS_GPIF_PCMCIAIOM; 124 hif_addr |= MANTIS_GPIF_PCMCIAIOM;
@@ -143,6 +146,7 @@ int mantis_hif_write_iom(struct mantis_ca *ca, u32 addr, u8 data)
143 struct mantis_pci *mantis = ca->ca_priv; 146 struct mantis_pci *mantis = ca->ca_priv;
144 u32 hif_addr = 0; 147 u32 hif_addr = 0;
145 148
149 dprintk(verbose, MANTIS_DEBUG, 1, "Adapter(%d) Slot(0): Request HIF I/O Write", mantis->num);
146 hif_addr &= ~MANTIS_GPIF_PCMCIAREG; 150 hif_addr &= ~MANTIS_GPIF_PCMCIAREG;
147 hif_addr &= ~MANTIS_GPIF_HIFRDWRN; 151 hif_addr &= ~MANTIS_GPIF_HIFRDWRN;
148 hif_addr |= MANTIS_GPIF_PCMCIAIOM; 152 hif_addr |= MANTIS_GPIF_PCMCIAIOM;