1
0
Fork 0

arch/h8300 update.

-----BEGIN PGP SIGNATURE-----
 
 iHkEABECADkWIQSgYnFi3j8cJth9/dOC7L743CGq0QUCW31aihsceXNhdG9AdXNl
 cnMuc291cmNlZm9yZ2UuanAACgkQguy++NwhqtGezQCdG6IcJORiacpzVVw5AsTv
 fsRTS8EAniU8F/lw0LlF77eyJzGP9Fa5ZJ8y
 =TN4Q
 -----END PGP SIGNATURE-----

Merge tag 'for-4.19' of git://git.sourceforge.jp/gitroot/uclinux-h8/linux

Pull arch/h8300 updates from Yoshinori Sato.

* tag 'for-4.19' of git://git.sourceforge.jp/gitroot/uclinux-h8/linux:
  h8300: fix IRQ no
  arch/h8300: add a defconfig target
  arch/h8300: eliminate kgbd.c warning
  arch/h8300: eliminate ptrace.h warnings
  h8300:let the checker know that size_t is ulong
  h8300: Don't include linux/kernel.h in asm/atomic.h
  h8300: remove unnecessary of_platform_populate call
  h8300: Correct signature of test_bit()
  h8300: irqchip: fix warning
  h8300: switch to NO_BOOTMEM
  h8300: gcc-8.1 fix
  h8300: Add missing output register.
hifive-unleashed-5.1
Linus Torvalds 2018-08-22 06:24:26 -07:00
commit 20a9e57a09
9 changed files with 31 additions and 53 deletions

View File

@ -16,6 +16,7 @@ config H8300
select OF_IRQ
select OF_EARLY_FLATTREE
select HAVE_MEMBLOCK
select NO_BOOTMEM
select TIMER_OF
select H8300_TMR8
select HAVE_KERNEL_GZIP

View File

@ -8,6 +8,8 @@
# (C) Copyright 2002-2015 Yoshinori Sato <ysato@users.sourceforge.jp>
#
KBUILD_DEFCONFIG := edosk2674_defconfig
cflags-$(CONFIG_CPU_H8300H) := -mh
aflags-$(CONFIG_CPU_H8300H) := -mh -Wa,--mach=h8300h
ldflags-$(CONFIG_CPU_H8300H) := -mh8300helf_linux
@ -22,6 +24,8 @@ KBUILD_CFLAGS += -DUTS_SYSNAME=\"uClinux\"
KBUILD_AFLAGS += $(aflags-y)
LDFLAGS += $(ldflags-y)
CHECKFLAGS += -msize-long
ifeq ($(CROSS_COMPILE),)
CROSS_COMPILE := h8300-unknown-linux-
endif

View File

@ -73,7 +73,7 @@
timer16: timer@ffff68 {
compatible = "renesas,16bit-timer";
reg = <0xffff68 8>, <0xffff60 8>;
interrupts = <24 0>;
interrupts = <26 0>;
renesas,channel = <0>;
clocks = <&fclk>;
clock-names = "fck";

View File

@ -29,11 +29,11 @@ static inline unsigned long ffz(unsigned long word)
result = -1;
__asm__("1:\n\t"
"shlr.l %2\n\t"
"shlr.l %1\n\t"
"adds #1,%0\n\t"
"bcs 1b"
: "=r"(result)
: "0"(result), "r"(word));
: "=r"(result),"=r"(word)
: "0"(result), "1"(word));
return result;
}
@ -66,7 +66,7 @@ H8300_GEN_BITOP(change_bit, "bnot")
#undef H8300_GEN_BITOP
static inline int test_bit(int nr, const unsigned long *addr)
static inline int test_bit(int nr, const volatile unsigned long *addr)
{
int ret = 0;
unsigned char *b_addr;
@ -162,11 +162,11 @@ static inline unsigned long __ffs(unsigned long word)
result = -1;
__asm__("1:\n\t"
"shlr.l %2\n\t"
"shlr.l %1\n\t"
"adds #1,%0\n\t"
"bcc 1b"
: "=r" (result)
: "0"(result), "r"(word));
: "=r" (result),"=r"(word)
: "0"(result), "1"(word));
return result;
}

View File

@ -4,6 +4,8 @@
#include <uapi/asm/ptrace.h>
struct task_struct;
#ifndef __ASSEMBLY__
#ifndef PS_S
#define PS_S (0x10)

View File

@ -129,7 +129,7 @@ void kgdb_arch_exit(void)
/* Nothing to do */
}
const struct kgdb_arch arch_kgdb_ops = {
struct kgdb_arch arch_kgdb_ops = {
/* Breakpoint instruction: trapa #2 */
.gdb_bpt_instr = { 0x57, 0x20 },
};

View File

@ -23,7 +23,6 @@
#include <linux/init.h>
#include <linux/of.h>
#include <linux/of_fdt.h>
#include <linux/of_platform.h>
#include <linux/of_address.h>
#include <linux/clk-provider.h>
#include <linux/memblock.h>
@ -71,10 +70,6 @@ void __init h8300_fdt_init(void *fdt, char *bootargs)
static void __init bootmem_init(void)
{
int bootmap_size;
unsigned long ram_start_pfn;
unsigned long free_ram_start_pfn;
unsigned long ram_end_pfn;
struct memblock_region *region;
memory_end = memory_start = 0;
@ -88,33 +83,17 @@ static void __init bootmem_init(void)
if (!memory_end)
panic("No memory!");
ram_start_pfn = PFN_UP(memory_start);
/* free_ram_start_pfn is first page after kernel */
free_ram_start_pfn = PFN_UP(__pa(_end));
ram_end_pfn = PFN_DOWN(memblock_end_of_DRAM());
/* setup bootmem globals (we use no_bootmem, but mm still depends on this) */
min_low_pfn = PFN_UP(memory_start);
max_low_pfn = PFN_DOWN(memblock_end_of_DRAM());
max_pfn = max_low_pfn;
max_pfn = ram_end_pfn;
memblock_reserve(__pa(_stext), _end - _stext);
/*
* give all the memory to the bootmap allocator, tell it to put the
* boot mem_map at the start of memory
*/
bootmap_size = init_bootmem_node(NODE_DATA(0),
free_ram_start_pfn,
0,
ram_end_pfn);
/*
* free the usable memory, we have to make sure we do not free
* the bootmem bitmap so we then reserve it after freeing it :-)
*/
free_bootmem(PFN_PHYS(free_ram_start_pfn),
(ram_end_pfn - free_ram_start_pfn) << PAGE_SHIFT);
reserve_bootmem(PFN_PHYS(free_ram_start_pfn), bootmap_size,
BOOTMEM_DEFAULT);
early_init_fdt_reserve_self();
early_init_fdt_scan_reserved_mem();
for_each_memblock(reserved, region) {
reserve_bootmem(region->base, region->size, BOOTMEM_DEFAULT);
}
memblock_dump_all();
}
void __init setup_arch(char **cmdline_p)
@ -188,15 +167,6 @@ const struct seq_operations cpuinfo_op = {
.show = show_cpuinfo,
};
static int __init device_probe(void)
{
of_platform_populate(NULL, NULL, NULL, NULL);
return 0;
}
device_initcall(device_probe);
#if defined(CONFIG_CPU_H8300H)
#define get_wait(base, addr) ({ \
int baddr; \

View File

@ -13,12 +13,13 @@
static void sim_write(struct console *con, const char *s, unsigned n)
{
register const int fd __asm__("er0") = 1; /* stdout */
register const char *_ptr __asm__("er1") = s;
register const unsigned _len __asm__("er2") = n;
__asm__(".byte 0x5e,0x00,0x00,0xc7\n\t" /* jsr @0xc7 (sys_write) */
: : "g"(fd), "g"(_ptr), "g"(_len));
__asm__("sub.l er0,er0\n\t" /* er0 = 1 (stdout) */
"inc.l #1,er0\n\t"
".byte 0x5e,0x00,0x00,0xc7\n\t" /* jsr @0xc7 (sys_write) */
: : "g"(_ptr), "g"(_len):"er0");
}
static int __init sim_setup(struct earlycon_device *device, const char *opt)

View File

@ -12,7 +12,7 @@
#include <asm/io.h>
static void *intc_baseaddr;
#define IPRA ((unsigned long)intc_baseaddr)
#define IPRA (intc_baseaddr)
static const unsigned char ipr_table[] = {
0x03, 0x02, 0x01, 0x00, 0x13, 0x12, 0x11, 0x10, /* 16 - 23 */
@ -34,7 +34,7 @@ static const unsigned char ipr_table[] = {
static void h8s_disable_irq(struct irq_data *data)
{
int pos;
unsigned int addr;
void __iomem *addr;
unsigned short pri;
int irq = data->irq;
@ -48,7 +48,7 @@ static void h8s_disable_irq(struct irq_data *data)
static void h8s_enable_irq(struct irq_data *data)
{
int pos;
unsigned int addr;
void __iomem *addr;
unsigned short pri;
int irq = data->irq;