Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
c1ea6029
Commit
c1ea6029
authored
Aug 19, 2004
by
Russell King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[MMC] Cleanup: Make MMCI debug macro take host, format and arguments.
parent
9fe3986d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
12 deletions
+11
-12
drivers/mmc/mmci.c
drivers/mmc/mmci.c
+11
-12
No files found.
drivers/mmc/mmci.c
View file @
c1ea6029
...
...
@@ -31,9 +31,10 @@
#define DRIVER_NAME "mmci-pl18x"
#ifdef CONFIG_MMC_DEBUG
#define DBG(x...) pr_debug(x)
#define DBG(host,fmt,args...) \
pr_debug("%s: %s: " fmt, host->mmc->host_name, __func__ , args)
#else
#define DBG(
x
...) do { } while (0)
#define DBG(
host,fmt,args
...) do { } while (0)
#endif
static
unsigned
int
fmax
=
515633
;
...
...
@@ -63,9 +64,8 @@ static void mmci_start_data(struct mmci_host *host, struct mmc_data *data)
{
unsigned
int
datactrl
,
timeout
,
irqmask
;
DBG
(
"%s: data: blksz %04x blks %04x flags %08x
\n
"
,
host
->
mmc
->
host_name
,
1
<<
data
->
blksz_bits
,
data
->
blocks
,
data
->
flags
);
DBG
(
host
,
"blksz %04x blks %04x flags %08x
\n
"
,
1
<<
data
->
blksz_bits
,
data
->
blocks
,
data
->
flags
);
host
->
data
=
data
;
host
->
buffer
=
data
->
req
->
buffer
;
...
...
@@ -98,8 +98,8 @@ static void mmci_start_data(struct mmci_host *host, struct mmc_data *data)
static
void
mmci_start_command
(
struct
mmci_host
*
host
,
struct
mmc_command
*
cmd
,
u32
c
)
{
DBG
(
"%s: cmd:
op %02x arg %08x flags %08x
\n
"
,
host
->
mmc
->
host_name
,
cmd
->
opcode
,
cmd
->
arg
,
cmd
->
flags
);
DBG
(
host
,
"
op %02x arg %08x flags %08x
\n
"
,
cmd
->
opcode
,
cmd
->
arg
,
cmd
->
flags
);
if
(
readl
(
host
->
base
+
MMCICOMMAND
)
&
MCI_CPSM_ENABLE
)
{
writel
(
0
,
host
->
base
+
MMCICOMMAND
);
...
...
@@ -189,7 +189,7 @@ static irqreturn_t mmci_pio_irq(int irq, void *dev_id, struct pt_regs *regs)
MCI_TXFIFOEMPTY
|
MCI_TXFIFOHALFEMPTY
)))
break
;
DBG
(
"%s: irq1 %08x
\n
"
,
host
->
mmc
->
host_name
,
status
);
DBG
(
host
,
"irq1 %08x
\n
"
,
status
);
if
(
status
&
(
MCI_RXDATAAVLBL
|
MCI_RXFIFOHALFFULL
))
{
int
count
=
host
->
size
-
(
readl
(
host
->
base
+
MMCIFIFOCNT
)
<<
2
);
...
...
@@ -260,7 +260,7 @@ static irqreturn_t mmci_irq(int irq, void *dev_id, struct pt_regs *regs)
if
(
!
(
status
&
MCI_IRQMASK
))
break
;
DBG
(
"%s: irq0 %08x
\n
"
,
host
->
mmc
->
host_name
,
status
);
DBG
(
host
,
"irq0 %08x
\n
"
,
status
);
data
=
host
->
data
;
if
(
status
&
(
MCI_DATACRCFAIL
|
MCI_DATATIMEOUT
|
MCI_TXUNDERRUN
|
...
...
@@ -302,9 +302,8 @@ static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
struct
mmci_host
*
host
=
mmc_priv
(
mmc
);
u32
clk
=
0
,
pwr
=
0
;
DBG
(
"%s: set_ios: clock %uHz busmode %u powermode %u Vdd %u
\n
"
,
mmc
->
host_name
,
ios
->
clock
,
ios
->
bus_mode
,
ios
->
power_mode
,
ios
->
vdd
);
DBG
(
host
,
"clock %uHz busmode %u powermode %u Vdd %u
\n
"
,
ios
->
clock
,
ios
->
bus_mode
,
ios
->
power_mode
,
ios
->
vdd
);
if
(
ios
->
clock
)
{
if
(
ios
->
clock
>=
host
->
mclk
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment