Commit 9c6e1828 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[media] drxk: Print detected configuration

DRX-K configuration is interesting when writing/testing
new devices. Add an info line showing the discovered info.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 147e110b
...@@ -905,6 +905,7 @@ static int GetDeviceCapabilities(struct drxk_state *state) ...@@ -905,6 +905,7 @@ static int GetDeviceCapabilities(struct drxk_state *state)
u16 sioPdrOhwCfg = 0; u16 sioPdrOhwCfg = 0;
u32 sioTopJtagidLo = 0; u32 sioTopJtagidLo = 0;
int status; int status;
const char *spin = "";
dprintk(1, "\n"); dprintk(1, "\n");
...@@ -954,12 +955,15 @@ static int GetDeviceCapabilities(struct drxk_state *state) ...@@ -954,12 +955,15 @@ static int GetDeviceCapabilities(struct drxk_state *state)
switch ((sioTopJtagidLo >> 29) & 0xF) { switch ((sioTopJtagidLo >> 29) & 0xF) {
case 0: case 0:
state->m_deviceSpin = DRXK_SPIN_A1; state->m_deviceSpin = DRXK_SPIN_A1;
spin = "A1";
break; break;
case 2: case 2:
state->m_deviceSpin = DRXK_SPIN_A2; state->m_deviceSpin = DRXK_SPIN_A2;
spin = "A2";
break; break;
case 3: case 3:
state->m_deviceSpin = DRXK_SPIN_A3; state->m_deviceSpin = DRXK_SPIN_A3;
spin = "A3";
break; break;
default: default:
state->m_deviceSpin = DRXK_SPIN_UNKNOWN; state->m_deviceSpin = DRXK_SPIN_UNKNOWN;
...@@ -1079,6 +1083,12 @@ static int GetDeviceCapabilities(struct drxk_state *state) ...@@ -1079,6 +1083,12 @@ static int GetDeviceCapabilities(struct drxk_state *state)
goto error2; goto error2;
} }
printk(KERN_INFO
"drxk: detected a drx-39%02xk, spin %s, xtal %d.%03d MHz\n",
((sioTopJtagidLo >> 12) & 0xFF), spin,
state->m_oscClockFreq / 1000,
state->m_oscClockFreq % 1000);
error: error:
if (status < 0) if (status < 0)
printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment