forked from Minki/linux
Xtensa fixes for v5.15:
- fix build/boot issues caused by CONFIG_OF vs CONFIC_USE_OF usage - fix reset handler for xtfpga boards -----BEGIN PGP SIGNATURE----- iQJHBAABCgAxFiEEK2eFS5jlMn3N6xfYUfnMkfg/oEQFAmFgeqATHGpjbXZia2Jj QGdtYWlsLmNvbQAKCRBR+cyR+D+gRPi0EACQ+lqEduaubNjfhqHvT7oZG+y/RGVP dKB9rnVhlKUqvudsjR0wIPrHbRA8fEL3w+SfN2HW6D/uR08cwB/e4eIUVZPabZxj 16LUv0mujoAApAPT8Qw+VdbjbbrChlnC8Hc8rpDbbyvs5qBiwc396yunumijGJtu iNkgSNziHXdKY8XfchHXMzfLWEdKXk6FEQcSvdzkUVqHUsjmh6HNFm9C146GrMQK UC1F29lRTx/kJov/cNn7WeQt14ceeXAIAESSYP3lwCc2/CQ4mq1Nrzh2j/NPBayf h2V97wZyOhALgGZcl3lNDfE6nY6nv4YUHidtCI5ZR2nYDmKQinioi6KDy8rIRKb3 1bNFwUpxVxmH3SZSM6ATNyN68G7whf/zhLY7WXTRQ9g4m63g2uFh3jH+/B2SWGSH cpgHWWHbTGNQGtbm/vpudLfgmFDJklg5BiornEXBJDsKfStDr9ZBrTR7Azf2WbPV 9vdd75ZhRoHX9LeB+EhpI1BpfBfGxpcxmNJ/vwSVW5VAAVi0cXsLY1fCA6gmHNLf L6KFGv0mVjy3nwWWfZ5umorsUcz5vyszbgNgfvGjFitAqIhEmd1BatYIsueF0uwE vf/iEJS7Tn0Si53lkmSKNTj0Yc7RUKADkMX7nay7wKaDkjZIVv8aqKoYPldCV5ly gI8ff7rDKjZBwQ== =kGqD -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
5d6ab0bb40
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user