lib: sbi: Remove sbi_console_init() and console_init() platform callback
Now that all platforms have been updated to initialize serial console device in early_init(), the sbi_console_init() and console_init() platform callback are redundant hence remove them. Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reviewed-By: Himanshu Chauhan <hchauhan@ventanamicro.com>
This commit is contained in:
parent
9e8a18fd0d
commit
119b15a553
|
@ -58,8 +58,6 @@ void sbi_console_set_device(const struct sbi_console_device *dev);
|
||||||
|
|
||||||
struct sbi_scratch;
|
struct sbi_scratch;
|
||||||
|
|
||||||
int sbi_console_init(struct sbi_scratch *scratch);
|
|
||||||
|
|
||||||
#define SBI_ASSERT(cond, args) do { \
|
#define SBI_ASSERT(cond, args) do { \
|
||||||
if (unlikely(!(cond))) \
|
if (unlikely(!(cond))) \
|
||||||
sbi_panic args; \
|
sbi_panic args; \
|
||||||
|
|
|
@ -111,9 +111,6 @@ struct sbi_platform_operations {
|
||||||
/** Get platform specific mhpmevent value */
|
/** Get platform specific mhpmevent value */
|
||||||
uint64_t (*pmu_xlate_to_mhpmevent)(uint32_t event_idx, uint64_t data);
|
uint64_t (*pmu_xlate_to_mhpmevent)(uint32_t event_idx, uint64_t data);
|
||||||
|
|
||||||
/** Initialize the platform console */
|
|
||||||
int (*console_init)(void);
|
|
||||||
|
|
||||||
/** Initialize the platform interrupt controller for current HART */
|
/** Initialize the platform interrupt controller for current HART */
|
||||||
int (*irqchip_init)(bool cold_boot);
|
int (*irqchip_init)(bool cold_boot);
|
||||||
/** Exit the platform interrupt controller for current HART */
|
/** Exit the platform interrupt controller for current HART */
|
||||||
|
@ -549,20 +546,6 @@ static inline uint64_t sbi_platform_pmu_xlate_to_mhpmevent(const struct sbi_plat
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Initialize the platform console
|
|
||||||
*
|
|
||||||
* @param plat pointer to struct sbi_platform
|
|
||||||
*
|
|
||||||
* @return 0 on success and negative error code on failure
|
|
||||||
*/
|
|
||||||
static inline int sbi_platform_console_init(const struct sbi_platform *plat)
|
|
||||||
{
|
|
||||||
if (plat && sbi_platform_ops(plat)->console_init)
|
|
||||||
return sbi_platform_ops(plat)->console_init();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize the platform interrupt controller for current HART
|
* Initialize the platform interrupt controller for current HART
|
||||||
*
|
*
|
||||||
|
|
|
@ -477,14 +477,3 @@ void sbi_console_set_device(const struct sbi_console_device *dev)
|
||||||
|
|
||||||
console_dev = dev;
|
console_dev = dev;
|
||||||
}
|
}
|
||||||
|
|
||||||
int sbi_console_init(struct sbi_scratch *scratch)
|
|
||||||
{
|
|
||||||
int rc = sbi_platform_console_init(sbi_platform_ptr(scratch));
|
|
||||||
|
|
||||||
/* console is not a necessary device */
|
|
||||||
if (rc == SBI_ENODEV)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
return rc;
|
|
||||||
}
|
|
||||||
|
|
|
@ -261,10 +261,6 @@ static void __noreturn init_coldboot(struct sbi_scratch *scratch, u32 hartid)
|
||||||
if (rc)
|
if (rc)
|
||||||
sbi_hart_hang();
|
sbi_hart_hang();
|
||||||
|
|
||||||
rc = sbi_console_init(scratch);
|
|
||||||
if (rc)
|
|
||||||
sbi_hart_hang();
|
|
||||||
|
|
||||||
rc = sbi_sse_init(scratch, true);
|
rc = sbi_sse_init(scratch, true);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
sbi_printf("%s: sse init failed (error %d)\n", __func__, rc);
|
sbi_printf("%s: sse init failed (error %d)\n", __func__, rc);
|
||||||
|
|
Loading…
Reference in New Issue