summaryrefslogtreecommitdiffstats
path: root/arch/arm/boards/kindle-mx50/board.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/boards/kindle-mx50/board.c')
-rw-r--r--arch/arm/boards/kindle-mx50/board.c40
1 files changed, 13 insertions, 27 deletions
diff --git a/arch/arm/boards/kindle-mx50/board.c b/arch/arm/boards/kindle-mx50/board.c
index bfcb9b83be..a5c81ac8e7 100644
--- a/arch/arm/boards/kindle-mx50/board.c
+++ b/arch/arm/boards/kindle-mx50/board.c
@@ -1,18 +1,6 @@
-/*
- * Copyright (C) 2007 Sascha Hauer, Pengutronix
- * Copyright (C) 2017 Alexander Kurz <akurz@blala.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.
- *
- */
+// SPDX-License-Identifier: GPL-2.0-or-later
+// SPDX-FileCopyrightText: 2007 Sascha Hauer, Pengutronix
+// SPDX-FileCopyrightText: 2017 Alexander Kurz <akurz@blala.de>
#include <common.h>
#include <envfs.h>
@@ -22,17 +10,16 @@
#include <driver.h>
#include <param.h>
#include <magicvar.h>
-#include <partition.h>
#include <libfile.h>
#include <globalvar.h>
#include <asm/armlinux.h>
-#include <generated/mach-types.h>
+#include <asm/mach-types.h>
#include <linux/sizes.h>
-#include <usb/fsl_usb2.h>
-#include <mach/generic.h>
-#include <mach/imx50-regs.h>
-#include <mach/imx5.h>
-#include <mach/revision.h>
+#include <linux/usb/fsl_usb2.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/imx50-regs.h>
+#include <mach/imx/imx5.h>
+#include <mach/imx/revision.h>
/* 16 byte id for serial number */
#define ATAG_SERIAL16 0x5441000a
@@ -72,9 +59,9 @@ static const char *get_env_16char_tag(const char *tag)
return value;
}
-BAREBOX_MAGICVAR_NAMED(global_atags_serial16, global.board.serial16,
+BAREBOX_MAGICVAR(global.board.serial16,
"Pass the kindle Serial as vendor-specific ATAG to linux");
-BAREBOX_MAGICVAR_NAMED(global_atags_revision16, global.board.revision16,
+BAREBOX_MAGICVAR(global.board.revision16,
"Pass the kindle BoardId as vendor-specific ATAG to linux");
/* The Kindle Kernel expects two custom ATAGs, ATAG_REVISION16 describing
@@ -96,10 +83,9 @@ static char *mac;
static void kindle_rev_init(void)
{
int ret;
- size_t size;
void *buf;
const char userdata[] = "/dev/mmc2.boot0.userdata";
- ret = read_file_2(userdata, &size, &buf, 128);
+ ret = read_file_2(userdata, NULL, &buf, 128);
if (ret && ret != -EFBIG) {
pr_err("Could not read board info from %s\n", userdata);
return;
@@ -154,7 +140,7 @@ mem_initcall(kindle_mx50_mem_init);
static int kindle_mx50_devices_init(void)
{
- struct device_d *dev;
+ struct device *dev;
if (!is_mx50_kindle())
return 0;