arm:lpc32xx:Fixing whitespaces in ea3250.c file
authorBangaragiri G <bangaragiri.g@nxp.com>
Mon, 26 Mar 2012 11:07:42 +0000 (11:07 +0000)
committerBangaragiri G <bangaragiri.g@nxp.com>
Mon, 26 Mar 2012 11:07:42 +0000 (11:07 +0000)
The whitespaces in ea3250.c files are removed

Signed-off-by: Bangaragiri G <bangaragiri.g@nxp.com>

board/nxp/ea3250/ea3250.c

index 54d9c39..3ba7970 100644 (file)
@@ -30,7 +30,7 @@
 #include <lpc3250.h>
 #include <net.h>
 #include "ea3250_prv.h"
-               
+
 DECLARE_GLOBAL_DATA_PTR;
 
 /* ISP1301 USB transceiver I2C registers */
@@ -215,7 +215,7 @@ static int i2c_wait_reset(int timeout)
                timeout--;
        }
 
-       return (timeout <= 0);  
+       return (timeout <= 0);
 }
 
 
@@ -224,10 +224,10 @@ static int isp1301_get_value(int reg)
        int n = 0;
 
        /* send isp1301 address */
-       OTG->otg_i2c.otg_i2c_txrx = ((ISP1301_I2C_ADDR << 1) | I2C_START_BIT);   
+       OTG->otg_i2c.otg_i2c_txrx = ((ISP1301_I2C_ADDR << 1) | I2C_START_BIT);
 
        /* register (offset) to read from */
-       OTG->otg_i2c.otg_i2c_txrx = reg;   
+       OTG->otg_i2c.otg_i2c_txrx = reg;
 
        /* repeat start */
        OTG->otg_i2c.otg_i2c_txrx = ((ISP1301_I2C_ADDR << 1) | I2C_START_BIT | I2C_READ);
@@ -251,24 +251,24 @@ static int isp1301_set_value(int reg, int value)
        int n = 0;
 
        /* send isp1301 address */
-       OTG->otg_i2c.otg_i2c_txrx = ((ISP1301_I2C_ADDR << 1) | I2C_START_BIT);   
+       OTG->otg_i2c.otg_i2c_txrx = ((ISP1301_I2C_ADDR << 1) | I2C_START_BIT);
 
        /* offset to write to */
-       OTG->otg_i2c.otg_i2c_txrx = (reg | I2C_WRITE);   
+       OTG->otg_i2c.otg_i2c_txrx = (reg | I2C_WRITE);
        /* value to write */
-       OTG->otg_i2c.otg_i2c_txrx = (value | I2C_STOP_BIT);  
-  
+       OTG->otg_i2c.otg_i2c_txrx = (value | I2C_STOP_BIT);
+
        /* wait for transmit done (TDI) */
        while (((OTG->otg_i2c.otg_i2c_stat & I2C_TDI) != I2C_TDI) && n++ < 100000);
 
        if (n>= 100000)
        {
                printf("isp1301_set_value: ERROR TDI not set\n");
-               return -1;              
+               return -1;
        }
-  
+
        /* clear TDI */
-       OTG->otg_i2c.otg_i2c_stat |= I2C_TDI;     
+       OTG->otg_i2c.otg_i2c_stat |= I2C_TDI;
 
        return 0;
 }
@@ -276,9 +276,9 @@ static int isp1301_set_value(int reg, int value)
 static void isp1301_configure(void)
 {
        OTG->otg_i2c.otg_i2c_clk_hi = 0x3f;
-       OTG->otg_i2c.otg_i2c_clk_lo = 0x3f; 
+       OTG->otg_i2c.otg_i2c_clk_lo = 0x3f;
 
-       OTG->otg_i2c.otg_i2c_ctrl |= I2C_RESET; 
+       OTG->otg_i2c.otg_i2c_ctrl |= I2C_RESET;
        i2c_wait_reset(100);
 
        /* LPC32XX only supports DAT_SE0 USB mode */
@@ -292,12 +292,12 @@ static void isp1301_configure(void)
                ISP1301_I2C_REG_CLEAR_ADDR), ~MC1_SPEED_REG);
        isp1301_set_value(ISP1301_I2C_MODE_CONTROL_1, MC1_SPEED_REG);
        isp1301_set_value((ISP1301_I2C_MODE_CONTROL_2 | ISP1301_I2C_REG_CLEAR_ADDR), ~0);
-       isp1301_set_value(ISP1301_I2C_MODE_CONTROL_2, 
+       isp1301_set_value(ISP1301_I2C_MODE_CONTROL_2,
                (MC2_BI_DI | MC2_PSW_EN | MC2_SPD_SUSP_CTRL));
 
        isp1301_set_value((ISP1301_I2C_OTG_CONTROL_1 | ISP1301_I2C_REG_CLEAR_ADDR), ~0);
        isp1301_set_value(ISP1301_I2C_MODE_CONTROL_1, MC1_DAT_SE0);
-       isp1301_set_value(ISP1301_I2C_OTG_CONTROL_1, 
+       isp1301_set_value(ISP1301_I2C_OTG_CONTROL_1,
                (OTG1_DM_PULLDOWN | OTG1_DP_PULLDOWN));
        isp1301_set_value((ISP1301_I2C_OTG_CONTROL_1 | ISP1301_I2C_REG_CLEAR_ADDR),
                (OTG1_DM_PULLUP | OTG1_DP_PULLUP));
@@ -309,13 +309,13 @@ static void isp1301_configure(void)
        CLKPWR->clkpwr_usb_ctrl |= (CLKPWR_USBCTRL_USBDVND_EN);
 
 
-       printf("\nISP1301 Vendor ID  : 0x%04x\n", 
+       printf("\nISP1301 Vendor ID  : 0x%04x\n",
                (isp1301_get_value(0x00) | (isp1301_get_value(0x01) << 8)));
-       printf("ISP1301 Product ID : 0x%04x\n", 
+       printf("ISP1301 Product ID : 0x%04x\n",
                (isp1301_get_value(0x02) | (isp1301_get_value(0x03) << 8)));
-       printf("ISP1301 Version ID : 0x%04x\n", 
+       printf("ISP1301 Version ID : 0x%04x\n",
                (isp1301_get_value(0x14) | (isp1301_get_value(0x15) << 8)));
-       
+
 }
 
 static void usbpll_setup(void)
@@ -330,15 +330,15 @@ static void usbpll_setup(void)
        CLKPWR->clkpwr_usb_ctrl |= CLKPWR_USBCTRL_CLK_EN1;
 
 
-       /* 
-         * Setup PLL.  
+       /*
+         * Setup PLL.
          *
          */
        CLKPWR->clkpwr_usb_ctrl |= CLKPWR_USBCTRL_FDBK_PLUS1(192-1);
        CLKPWR->clkpwr_usb_ctrl |= CLKPWR_USBCTRL_POSTDIV_2POW(0x01);
        CLKPWR->clkpwr_usb_ctrl |= CLKPWR_USBCTRL_PLL_PWRUP;
-       
+
+
        while ((CLKPWR->clkpwr_usb_ctrl & CLKPWR_USBCTRL_PLL_STS) == 0)
        {
                if (n++ >= 100000)
@@ -349,14 +349,14 @@ static void usbpll_setup(void)
        }
 
        /* enable PLL output */
-       CLKPWR->clkpwr_usb_ctrl |= CLKPWR_USBCTRL_CLK_EN2;              
+       CLKPWR->clkpwr_usb_ctrl |= CLKPWR_USBCTRL_CLK_EN2;
 }
 
 
 int usb_board_init(void)
 {
        /* enable AHB slave USB clock */
-       CLKPWR->clkpwr_usb_ctrl |= 
+       CLKPWR->clkpwr_usb_ctrl |=
                (CLKPWR_USBCTRL_HCLK_EN | CLKPWR_USBCTRL_BUS_KEEPER);
 
        /* enable I2C clock in OTG block if it isn't */
@@ -384,7 +384,7 @@ int usb_board_init(void)
                |OTG_CLK_I2C_EN|OTG_CLK_HOST_EN)) !=
               (OTG_CLK_AHB_EN|OTG_CLK_OTG_EN
                |OTG_CLK_I2C_EN|OTG_CLK_HOST_EN)) ;
-       
+
        OTG->otg_sts_ctrl |= OTG_HOST_EN;
        isp1301_set_value(ISP1301_I2C_OTG_CONTROL_1, OTG1_VBUS_DRV);
 
@@ -395,7 +395,7 @@ int usb_board_stop(void)
 {
        /* vbus off */
        isp1301_set_value(
-               (ISP1301_I2C_OTG_CONTROL_1| ISP1301_I2C_REG_CLEAR_ADDR), 
+               (ISP1301_I2C_OTG_CONTROL_1| ISP1301_I2C_REG_CLEAR_ADDR),
                OTG1_VBUS_DRV);
 
        OTG->otg_sts_ctrl &= ~OTG_HOST_EN;