summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMichal Simek <monstr@monstr.eu>2007-09-24 00:04:22 +0200
committerMichal Simek <monstr@monstr.eu>2007-09-24 00:04:22 +0200
commit6b6f287a33ae8c340f97fb08ed95b6687e2baa4b (patch)
tree57d0aa201f36c6dd5a43efd23a0ee2ded95440ba /drivers
parentd45963854eff39d575124d859419bb4953ce2c87 (diff)
parent66dcad3a9a53e0766d90e0084123bd8529522fb0 (diff)
downloadu-boot-imx-6b6f287a33ae8c340f97fb08ed95b6687e2baa4b.zip
u-boot-imx-6b6f287a33ae8c340f97fb08ed95b6687e2baa4b.tar.gz
u-boot-imx-6b6f287a33ae8c340f97fb08ed95b6687e2baa4b.tar.bz2
Merge ../u-boot
Diffstat (limited to 'drivers')
-rw-r--r--drivers/nand/nand_util.c21
-rw-r--r--drivers/qe/qe.c7
-rw-r--r--drivers/tsec.c2
-rw-r--r--drivers/usbdcore_mpc8xx.c3
4 files changed, 21 insertions, 12 deletions
diff --git a/drivers/nand/nand_util.c b/drivers/nand/nand_util.c
index cf05043..4fd4e16 100644
--- a/drivers/nand/nand_util.c
+++ b/drivers/nand/nand_util.c
@@ -210,9 +210,12 @@ int nand_erase_opts(nand_info_t *meminfo, const nand_erase_options_t *opts)
if (!opts->quiet) {
unsigned long long n =(unsigned long long)
- (erase.addr+meminfo->erasesize-opts->offset)
- * 100;
- int percent = (int)do_div(n, erase_length);
+ (erase.addr + meminfo->erasesize - opts->offset)
+ * 100;
+ int percent;
+
+ do_div(n, erase_length);
+ percent = (int)n;
/* output progress message only at whole percent
* steps to reduce the number of messages printed
@@ -478,7 +481,11 @@ int nand_write_opts(nand_info_t *meminfo, const nand_write_options_t *opts)
if (!opts->quiet) {
unsigned long long n = (unsigned long long)
(opts->length-imglen) * 100;
- int percent = (int)do_div(n, opts->length);
+ int percent;
+
+ do_div(n, opts->length);
+ percent = (int)n;
+
/* output progress message only at whole percent
* steps to reduce the number of messages printed
* on (slow) serial consoles
@@ -653,7 +660,11 @@ int nand_read_opts(nand_info_t *meminfo, const nand_read_options_t *opts)
if (!opts->quiet) {
unsigned long long n = (unsigned long long)
(opts->length-imglen) * 100;
- int percent = (int)do_div(n ,opts->length);
+ int percent;
+
+ do_div(n, opts->length);
+ percent = (int)n;
+
/* output progress message only at whole percent
* steps to reduce the number of messages printed
* on (slow) serial consoles
diff --git a/drivers/qe/qe.c b/drivers/qe/qe.c
index 0f5232a..7559e92 100644
--- a/drivers/qe/qe.c
+++ b/drivers/qe/qe.c
@@ -30,6 +30,8 @@
qe_map_t *qe_immr = NULL;
static qe_snum_t snums[QE_NUM_OF_SNUM];
+DECLARE_GLOBAL_DATA_PTR;
+
void qe_issue_cmd(uint cmd, uint sbc, u8 mcn, u32 cmd_data)
{
u32 cecr;
@@ -51,8 +53,6 @@ void qe_issue_cmd(uint cmd, uint sbc, u8 mcn, u32 cmd_data)
uint qe_muram_alloc(uint size, uint align)
{
- DECLARE_GLOBAL_DATA_PTR;
-
uint retloc;
uint align_mask, off;
uint savebase;
@@ -158,8 +158,6 @@ void qe_put_snum(u8 snum)
void qe_init(uint qe_base)
{
- DECLARE_GLOBAL_DATA_PTR;
-
/* Init the QE IMMR base */
qe_immr = (qe_map_t *)qe_base;
@@ -204,7 +202,6 @@ void qe_assign_page(uint snum, uint para_ram_base)
int qe_set_brg(uint brg, uint rate)
{
- DECLARE_GLOBAL_DATA_PTR;
volatile uint *bp;
u32 divisor;
int div16 = 0;
diff --git a/drivers/tsec.c b/drivers/tsec.c
index 6bca4dc..4ff3339 100644
--- a/drivers/tsec.c
+++ b/drivers/tsec.c
@@ -1262,10 +1262,10 @@ uint mii_parse_lxt971_sr2(uint mii_reg, struct tsec_private *priv)
case MIIM_LXT971_SR2_100HDX:
priv->speed = 100;
priv->duplexity = 0;
+ break;
default:
priv->speed = 100;
priv->duplexity = 1;
- break;
}
} else {
priv->speed = 0;
diff --git a/drivers/usbdcore_mpc8xx.c b/drivers/usbdcore_mpc8xx.c
index e87284b..d4c4096 100644
--- a/drivers/usbdcore_mpc8xx.c
+++ b/drivers/usbdcore_mpc8xx.c
@@ -64,6 +64,8 @@
#include "usbdcore_mpc8xx.h"
#include "usbdcore_ep0.h"
+DECLARE_GLOBAL_DATA_PTR;
+
#define ERR(fmt, args...)\
serial_printf("ERROR : [%s] %s:%d: "fmt,\
__FILE__,__FUNCTION__,__LINE__, ##args)
@@ -1216,7 +1218,6 @@ static void mpc8xx_udc_clock_init (volatile immap_t * immr,
#elif defined(CFG_USB_BRGCLK)
/* This has been tested with brgclk == 50MHz */
- DECLARE_GLOBAL_DATA_PTR;
int divisor = 0;
if (gd->cpu_clk < 48000000L) {