]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - board/lwmon5/kbd.c
karo: fdt: fix panel-dpi support
[karo-tx-uboot.git] / board / lwmon5 / kbd.c
index 5231c7a5c6f94d60eb7a6f2c0c63ced7d86f47c0..97962daf93948773db6b8edaddaf71512d3917e5 100644 (file)
@@ -6,20 +6,7 @@
  * DENX Software Engineering
  * Wolfgang Denk, wd@denx.de
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 /* define DEBUG for debugging output (obviously ;-)) */
@@ -111,9 +98,9 @@ static void kbd_init (void)
        uchar val, errcd;
        int i;
 
-       i2c_init (CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
+       i2c_set_bus_num(0);
 
-       gd->kbd_status = 0;
+       gd->arch.kbd_status = 0;
 
        /* Forced by PIC. Delays <= 175us loose */
        udelay(1000);
@@ -127,7 +114,7 @@ static void kbd_init (void)
        /* clear "irrelevant" bits. Recommended by Martin Rajek, LWN */
        errcd &= ~(KEYBD_STATUS_H_RESET|KEYBD_STATUS_BROWNOUT);
        if (errcd) {
-               gd->kbd_status |= errcd << 8;
+               gd->arch.kbd_status |= errcd << 8;
        }
        /* Reset error code and verify */
        val = KEYBD_CMD_RESET_ERRORS;
@@ -140,7 +127,7 @@ static void kbd_init (void)
 
        val &= KEYBD_STATUS_MASK;       /* clear unused bits */
        if (val) {                      /* permanent error, report it */
-               gd->kbd_status |= val;
+               gd->arch.kbd_status |= val;
                return;
        }
 
@@ -216,8 +203,8 @@ int misc_init_r_kbd (void)
 {
        uchar kbd_data[KEYBD_DATALEN];
        char keybd_env[2 * KEYBD_DATALEN + 1];
-       uchar kbd_init_status = gd->kbd_status >> 8;
-       uchar kbd_status = gd->kbd_status;
+       uchar kbd_init_status = gd->arch.kbd_status >> 8;
+       uchar kbd_status = gd->arch.kbd_status;
        uchar val;
        ushort data, inv_data;
        char *str;