Commit 5d6ab0bb authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'xtensa-20211008' of git://github.com/jcmvbkbc/linux-xtensa

Pull xtensa fixes from Max Filippov:

 - fix build/boot issues caused by CONFIG_OF vs CONFIC_USE_OF usage

 - fix reset handler for xtfpga boards

* tag 'xtensa-20211008' of git://github.com/jcmvbkbc/linux-xtensa:
  xtensa: xtfpga: Try software restart before simulating CPU reset
  xtensa: xtfpga: use CONFIG_USE_OF instead of CONFIG_OF
  xtensa: call irqchip_init only when CONFIG_USE_OF is selected
  xtensa: use CONFIG_USE_OF instead of CONFIG_OF
parents 3946b46c 012e9745
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -78,7 +78,7 @@
#endif
#define XCHAL_KIO_SIZE			0x10000000

#if (!XCHAL_HAVE_PTP_MMU || XCHAL_HAVE_SPANNING_WAY) && defined(CONFIG_OF)
#if (!XCHAL_HAVE_PTP_MMU || XCHAL_HAVE_SPANNING_WAY) && defined(CONFIG_USE_OF)
#define XCHAL_KIO_PADDR			xtensa_get_kio_paddr()
#ifndef __ASSEMBLY__
extern unsigned long xtensa_kio_paddr;
+1 −1
Original line number Diff line number Diff line
@@ -143,7 +143,7 @@ unsigned xtensa_get_ext_irq_no(unsigned irq)

void __init init_IRQ(void)
{
#ifdef CONFIG_OF
#ifdef CONFIG_USE_OF
	irqchip_init();
#else
#ifdef CONFIG_HAVE_SMP
+6 −6
Original line number Diff line number Diff line
@@ -63,7 +63,7 @@ extern unsigned long initrd_end;
extern int initrd_below_start_ok;
#endif

#ifdef CONFIG_OF
#ifdef CONFIG_USE_OF
void *dtb_start = __dtb_start;
#endif

@@ -125,7 +125,7 @@ __tagtable(BP_TAG_INITRD, parse_tag_initrd);

#endif /* CONFIG_BLK_DEV_INITRD */

#ifdef CONFIG_OF
#ifdef CONFIG_USE_OF

static int __init parse_tag_fdt(const bp_tag_t *tag)
{
@@ -135,7 +135,7 @@ static int __init parse_tag_fdt(const bp_tag_t *tag)

__tagtable(BP_TAG_FDT, parse_tag_fdt);

#endif /* CONFIG_OF */
#endif /* CONFIG_USE_OF */

static int __init parse_tag_cmdline(const bp_tag_t* tag)
{
@@ -183,7 +183,7 @@ static int __init parse_bootparam(const bp_tag_t *tag)
}
#endif

#ifdef CONFIG_OF
#ifdef CONFIG_USE_OF

#if !XCHAL_HAVE_PTP_MMU || XCHAL_HAVE_SPANNING_WAY
unsigned long xtensa_kio_paddr = XCHAL_KIO_DEFAULT_PADDR;
@@ -232,7 +232,7 @@ void __init early_init_devtree(void *params)
		strlcpy(command_line, boot_command_line, COMMAND_LINE_SIZE);
}

#endif /* CONFIG_OF */
#endif /* CONFIG_USE_OF */

/*
 * Initialize architecture. (Early stage)
@@ -253,7 +253,7 @@ void __init init_arch(bp_tag_t *bp_start)
	if (bp_start)
		parse_bootparam(bp_start);

#ifdef CONFIG_OF
#ifdef CONFIG_USE_OF
	early_init_devtree(dtb_start);
#endif

+1 −1
Original line number Diff line number Diff line
@@ -101,7 +101,7 @@ void init_mmu(void)

void init_kio(void)
{
#if XCHAL_HAVE_PTP_MMU && XCHAL_HAVE_SPANNING_WAY && defined(CONFIG_OF)
#if XCHAL_HAVE_PTP_MMU && XCHAL_HAVE_SPANNING_WAY && defined(CONFIG_USE_OF)
	/*
	 * Update the IO area mapping in case xtensa_kio_paddr has changed
	 */
+8 −4
Original line number Diff line number Diff line
@@ -51,8 +51,12 @@ void platform_power_off(void)

void platform_restart(void)
{
	/* Flush and reset the mmu, simulate a processor reset, and
	 * jump to the reset vector. */
	/* Try software reset first. */
	WRITE_ONCE(*(u32 *)XTFPGA_SWRST_VADDR, 0xdead);

	/* If software reset did not work, flush and reset the mmu,
	 * simulate a processor reset, and jump to the reset vector.
	 */
	cpu_reset();
	/* control never gets here */
}
@@ -66,7 +70,7 @@ void __init platform_calibrate_ccount(void)

#endif

#ifdef CONFIG_OF
#ifdef CONFIG_USE_OF

static void __init xtfpga_clk_setup(struct device_node *np)
{
@@ -284,4 +288,4 @@ static int __init xtavnet_init(void)
 */
arch_initcall(xtavnet_init);

#endif /* CONFIG_OF */
#endif /* CONFIG_USE_OF */