mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-23 06:14:42 +08:00
various h8300 fix.
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABCAAGBQJW9BppAAoJEEdC8EELKDmc5s0P+wekFLt/L9aZieCi9K9au/yA nFK4LuSQ2L9+yhJDdkmrv8+iZv65+42TZBTF6T+0bMFR9AhkPojkQJDJtu3JVcn+ 6l4ufXxLKwrQaafBhhW1q0CitdLqwSrnFqxRmYshgJimxQVBvmeaNEJSyHkmyO/W 52V1gxkk89DqdkvWUSHS8pIKOgNLLiSNlXuL1LD1CfaDZORVnABt4upCOj2Aww2N uEO5rBC+B8k3nc1Dq9RwFQ/7GgnyMhiTIgUo0XHlCerTuiJy+V24fS4Uzy6R2O6x iFYuHifaJcn6ASVmqRbw2fr9tetBEa+e7Pr2pzYFuYVi5Wx9irZP1DZSPip/Q07Y +9AbP0uyOvCwxNysEdlsU+4u6V1SdFkRWeVd49nYsoLkZ/Eh85iEZ8Ct+kNjP6XW vNx5BJyISCV4FCBfkZi4NY/qzqikrWaXOvtYoJeOCZWyqF9ZGaQt5tWvyjAgRYgL n5Ab6/41BXNSRXUs4bAoCHuiTQCbIUqOu2RcrumUpkq4Q6lnI4dwxxF2tHjJDWe1 xcLCKDZpqvnclL9H8zTQYmq0LqzaywKxbRROOirKLkeuWBI67J9cFdctDBlRP5U2 7oWfAz8N+NRjba81eYqh4ZwZItG5grww+FaMQ4VbpkzOAxCgyvUwAm6ftZalyx89 uKbYa4pqfFCnPCCPRR7N =2pTQ -----END PGP SIGNATURE----- Merge tag 'for-4.6' of git://git.osdn.jp/gitroot/uclinux-h8/linux Pull h8300 updates from Yoshinori Sato: "Various h8300 fixes" * tag 'for-4.6' of git://git.osdn.jp/gitroot/uclinux-h8/linux: h8300: switch EARLYCON h8300: dts: Rename the serial port clock to fck
This commit is contained in:
commit
732b84eece
@ -88,20 +88,20 @@
|
|||||||
reg = <0xffff78 8>;
|
reg = <0xffff78 8>;
|
||||||
interrupts = <88 0>, <89 0>, <90 0>, <91 0>;
|
interrupts = <88 0>, <89 0>, <90 0>, <91 0>;
|
||||||
clocks = <&fclk>;
|
clocks = <&fclk>;
|
||||||
clock-names = "sci_ick";
|
clock-names = "fck";
|
||||||
};
|
};
|
||||||
sci1: serial@ffff80 {
|
sci1: serial@ffff80 {
|
||||||
compatible = "renesas,sci";
|
compatible = "renesas,sci";
|
||||||
reg = <0xffff80 8>;
|
reg = <0xffff80 8>;
|
||||||
interrupts = <92 0>, <93 0>, <94 0>, <95 0>;
|
interrupts = <92 0>, <93 0>, <94 0>, <95 0>;
|
||||||
clocks = <&fclk>;
|
clocks = <&fclk>;
|
||||||
clock-names = "sci_ick";
|
clock-names = "fck";
|
||||||
};
|
};
|
||||||
sci2: serial@ffff88 {
|
sci2: serial@ffff88 {
|
||||||
compatible = "renesas,sci";
|
compatible = "renesas,sci";
|
||||||
reg = <0xffff88 8>;
|
reg = <0xffff88 8>;
|
||||||
interrupts = <96 0>, <97 0>, <98 0>, <99 0>;
|
interrupts = <96 0>, <97 0>, <98 0>, <99 0>;
|
||||||
clocks = <&fclk>;
|
clocks = <&fclk>;
|
||||||
clock-names = "sci_ick";
|
clock-names = "fck";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -83,7 +83,7 @@
|
|||||||
reg = <0xffffb0 8>;
|
reg = <0xffffb0 8>;
|
||||||
interrupts = <52 0>, <53 0>, <54 0>, <55 0>;
|
interrupts = <52 0>, <53 0>, <54 0>, <55 0>;
|
||||||
clocks = <&fclk>;
|
clocks = <&fclk>;
|
||||||
clock-names = "sci_ick";
|
clock-names = "fck";
|
||||||
};
|
};
|
||||||
|
|
||||||
sci1: serial@ffffb8 {
|
sci1: serial@ffffb8 {
|
||||||
@ -91,6 +91,6 @@
|
|||||||
reg = <0xffffb8 8>;
|
reg = <0xffffb8 8>;
|
||||||
interrupts = <56 0>, <57 0>, <58 0>, <59 0>;
|
interrupts = <56 0>, <57 0>, <58 0>, <59 0>;
|
||||||
clocks = <&fclk>;
|
clocks = <&fclk>;
|
||||||
clock-names = "sci_ick";
|
clock-names = "fck";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -87,13 +87,13 @@
|
|||||||
reg = <0xffff78 8>;
|
reg = <0xffff78 8>;
|
||||||
interrupts = <88 0>, <89 0>, <90 0>, <91 0>;
|
interrupts = <88 0>, <89 0>, <90 0>, <91 0>;
|
||||||
clocks = <&fclk>;
|
clocks = <&fclk>;
|
||||||
clock-names = "sci_ick";
|
clock-names = "fck";
|
||||||
};
|
};
|
||||||
sci1: serial@ffff80 {
|
sci1: serial@ffff80 {
|
||||||
compatible = "renesas,sci";
|
compatible = "renesas,sci";
|
||||||
reg = <0xffff80 8>;
|
reg = <0xffff80 8>;
|
||||||
interrupts = <92 0>, <93 0>, <94 0>, <95 0>;
|
interrupts = <92 0>, <93 0>, <94 0>, <95 0>;
|
||||||
clocks = <&fclk>;
|
clocks = <&fclk>;
|
||||||
clock-names = "sci_ick";
|
clock-names = "fck";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -34,7 +34,7 @@ CONFIG_BINFMT_FLAT=y
|
|||||||
# CONFIG_LEGACY_PTYS is not set
|
# CONFIG_LEGACY_PTYS is not set
|
||||||
# CONFIG_DEVKMEM is not set
|
# CONFIG_DEVKMEM is not set
|
||||||
CONFIG_SERIAL_SH_SCI=y
|
CONFIG_SERIAL_SH_SCI=y
|
||||||
CONFIG_SERIAL_SH_SCI_CONSOLE=y
|
CONFIG_SERIAL_SH_SCI_EARLYCON=y
|
||||||
# CONFIG_HW_RANDOM is not set
|
# CONFIG_HW_RANDOM is not set
|
||||||
# CONFIG_HWMON is not set
|
# CONFIG_HWMON is not set
|
||||||
# CONFIG_USB_SUPPORT is not set
|
# CONFIG_USB_SUPPORT is not set
|
||||||
|
@ -20,8 +20,6 @@
|
|||||||
#include <linux/bootmem.h>
|
#include <linux/bootmem.h>
|
||||||
#include <linux/seq_file.h>
|
#include <linux/seq_file.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/platform_device.h>
|
|
||||||
#include <linux/module.h>
|
|
||||||
#include <linux/of.h>
|
#include <linux/of.h>
|
||||||
#include <linux/of_fdt.h>
|
#include <linux/of_fdt.h>
|
||||||
#include <linux/of_platform.h>
|
#include <linux/of_platform.h>
|
||||||
@ -137,11 +135,6 @@ void __init setup_arch(char **cmdline_p)
|
|||||||
parse_early_param();
|
parse_early_param();
|
||||||
|
|
||||||
bootmem_init();
|
bootmem_init();
|
||||||
#if defined(CONFIG_H8300H_SIM) || defined(CONFIG_H8S_SIM)
|
|
||||||
sim_console_register();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
early_platform_driver_probe("earlyprintk", 1, 0);
|
|
||||||
/*
|
/*
|
||||||
* get kmalloc into gear
|
* get kmalloc into gear
|
||||||
*/
|
*/
|
||||||
|
@ -1,79 +1,30 @@
|
|||||||
/*
|
/*
|
||||||
* arch/h8300/kernel/early_printk.c
|
* arch/h8300/kernel/sim-console.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009 Yoshinori Sato <ysato@users.sourceforge.jp>
|
* Copyright (C) 2015 Yoshinori Sato <ysato@users.sourceforge.jp>
|
||||||
*
|
*
|
||||||
* This file is subject to the terms and conditions of the GNU General Public
|
* This file is subject to the terms and conditions of the GNU General Public
|
||||||
* License. See the file "COPYING" in the main directory of this archive
|
* License. See the file "COPYING" in the main directory of this archive
|
||||||
* for more details.
|
* for more details.
|
||||||
*/
|
*/
|
||||||
#include <linux/console.h>
|
#include <linux/console.h>
|
||||||
#include <linux/tty.h>
|
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/io.h>
|
#include <linux/serial_core.h>
|
||||||
#include <linux/platform_device.h>
|
|
||||||
|
|
||||||
static void sim_write(struct console *co, const char *ptr,
|
static void sim_write(struct console *con, const char *s, unsigned n)
|
||||||
unsigned len)
|
|
||||||
{
|
{
|
||||||
register const int fd __asm__("er0") = 1; /* stdout */
|
register const int fd __asm__("er0") = 1; /* stdout */
|
||||||
register const char *_ptr __asm__("er1") = ptr;
|
register const char *_ptr __asm__("er1") = s;
|
||||||
register const unsigned _len __asm__("er2") = len;
|
register const unsigned _len __asm__("er2") = n;
|
||||||
|
|
||||||
__asm__(".byte 0x5e,0x00,0x00,0xc7\n\t" /* jsr @0xc7 (sys_write) */
|
__asm__(".byte 0x5e,0x00,0x00,0xc7\n\t" /* jsr @0xc7 (sys_write) */
|
||||||
: : "g"(fd), "g"(_ptr), "g"(_len));
|
: : "g"(fd), "g"(_ptr), "g"(_len));
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct console sim_console = {
|
static int __init sim_setup(struct earlycon_device *device, const char *opt)
|
||||||
.name = "sim_console",
|
|
||||||
.write = sim_write,
|
|
||||||
.setup = NULL,
|
|
||||||
.flags = CON_PRINTBUFFER,
|
|
||||||
.index = -1,
|
|
||||||
};
|
|
||||||
|
|
||||||
static char sim_console_buf[32];
|
|
||||||
|
|
||||||
static int sim_probe(struct platform_device *pdev)
|
|
||||||
{
|
{
|
||||||
if (sim_console.data)
|
device->con->write = sim_write;
|
||||||
return -EEXIST;
|
|
||||||
|
|
||||||
if (!strstr(sim_console_buf, "keep"))
|
|
||||||
sim_console.flags |= CON_BOOT;
|
|
||||||
|
|
||||||
register_console(&sim_console);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int sim_remove(struct platform_device *pdev)
|
EARLYCON_DECLARE(h8sim, sim_setup);
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct platform_driver sim_driver = {
|
|
||||||
.probe = sim_probe,
|
|
||||||
.remove = sim_remove,
|
|
||||||
.driver = {
|
|
||||||
.name = "h8300-sim",
|
|
||||||
.owner = THIS_MODULE,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
early_platform_init_buffer("earlyprintk", &sim_driver,
|
|
||||||
sim_console_buf, ARRAY_SIZE(sim_console_buf));
|
|
||||||
|
|
||||||
static struct platform_device sim_console_device = {
|
|
||||||
.name = "h8300-sim",
|
|
||||||
.id = 0,
|
|
||||||
};
|
|
||||||
|
|
||||||
static struct platform_device *devices[] __initdata = {
|
|
||||||
&sim_console_device,
|
|
||||||
};
|
|
||||||
|
|
||||||
void __init sim_console_register(void)
|
|
||||||
{
|
|
||||||
early_platform_add_devices(devices,
|
|
||||||
ARRAY_SIZE(devices));
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user