aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2009-08-07 19:24:58 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2009-09-15 12:02:14 -0700
commitdabe6e694685150b25ff357e1ef401b96ab81ec3 (patch)
treeabec88a6b8cbf354cc7ef3698566b04834f6c807 /drivers
parent3cacf72922067271ee2ad4debc398a53aeaf8a41 (diff)
Staging: sep: load_rom is remarkably verbose and repetetive
Give it a haircut Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/sep/sep_driver.c25
1 files changed, 6 insertions, 19 deletions
diff --git a/drivers/staging/sep/sep_driver.c b/drivers/staging/sep/sep_driver.c
index 6a4681742ce..7942143c554 100644
--- a/drivers/staging/sep/sep_driver.c
+++ b/drivers/staging/sep/sep_driver.c
@@ -105,9 +105,9 @@ static void sep_load_rom_code(struct sep_device *sep)
sep_write_reg(sep, HW_HOST_SEP_SW_RST_REG_ADDR, 0x1);
/* poll for SEP ROM boot finish */
- do {
+ do
reg = sep_read_reg(sep, HW_HOST_SEP_HOST_GPR3_REG_ADDR);
- } while (!reg);
+ while (!reg);
edbg("SEP Driver: ROM polling ended\n");
@@ -117,31 +117,18 @@ static void sep_load_rom_code(struct sep_device *sep)
error = sep_read_reg(sep, HW_HOST_SEP_HOST_GPR0_REG_ADDR);
edbg("SEP Driver: ROM polling case 1\n");
break;
- case 0x2:
- /* Boot First Phase ended */
- warning = sep_read_reg(sep, HW_HOST_SEP_HOST_GPR0_REG_ADDR);
- edbg("SEP Driver: ROM polling case 2\n");
- break;
case 0x4:
/* Cold boot ended successfully */
- warning = sep_read_reg(sep, HW_HOST_SEP_HOST_GPR0_REG_ADDR);
- edbg("SEP Driver: ROM polling case 4\n");
- error = 0;
- break;
case 0x8:
/* Warmboot ended successfully */
- warning = sep_read_reg(sep, HW_HOST_SEP_HOST_GPR0_REG_ADDR);
- edbg("SEP Driver: ROM polling case 8\n");
- error = 0;
- break;
case 0x10:
/* ColdWarm boot ended successfully */
- warning = sep_read_reg(sep, HW_HOST_SEP_HOST_GPR0_REG_ADDR);
- edbg("SEP Driver: ROM polling case 16\n");
error = 0;
- break;
+ case 0x2:
+ /* Boot First Phase ended */
+ warning = sep_read_reg(sep, HW_HOST_SEP_HOST_GPR0_REG_ADDR);
case 0x20:
- edbg("SEP Driver: ROM polling case 32\n");
+ edbg("SEP Driver: ROM polling case %d\n", reg);
break;
}