Make the noop clock successfully do nothing, because doing nothing and
returning an error status (which the NULL method pointers caused) isn't nearly as useful.
This commit is contained in:
parent
4169ecbb8f
commit
14548b7c32
@ -137,9 +137,12 @@ static struct resource_spec am335x_prcm_spec[] = {
|
||||
|
||||
static struct am335x_prcm_softc *am335x_prcm_sc = NULL;
|
||||
|
||||
static int am335x_clk_noop_activate(struct ti_clock_dev *clkdev);
|
||||
static int am335x_clk_generic_activate(struct ti_clock_dev *clkdev);
|
||||
static int am335x_clk_gpio_activate(struct ti_clock_dev *clkdev);
|
||||
static int am335x_clk_noop_deactivate(struct ti_clock_dev *clkdev);
|
||||
static int am335x_clk_generic_deactivate(struct ti_clock_dev *clkdev);
|
||||
static int am335x_clk_noop_set_source(struct ti_clock_dev *clkdev, clk_src_t clksrc);
|
||||
static int am335x_clk_generic_set_source(struct ti_clock_dev *clkdev, clk_src_t clksrc);
|
||||
static int am335x_clk_hsmmc_get_source_freq(struct ti_clock_dev *clkdev, unsigned int *freq);
|
||||
static int am335x_clk_get_sysclk_freq(struct ti_clock_dev *clkdev, unsigned int *freq);
|
||||
@ -152,7 +155,13 @@ static int am335x_clk_lcdc_activate(struct ti_clock_dev *clkdev);
|
||||
static int am335x_clk_pruss_activate(struct ti_clock_dev *clkdev);
|
||||
|
||||
#define AM335X_NOOP_CLOCK_DEV(i) \
|
||||
{ .id = (i) }
|
||||
{ .id = (i), \
|
||||
.clk_activate = am335x_clk_noop_activate, \
|
||||
.clk_deactivate = am335x_clk_noop_deactivate, \
|
||||
.clk_set_source = am335x_clk_noop_set_source, \
|
||||
.clk_accessible = NULL, \
|
||||
.clk_get_source_freq = NULL \
|
||||
}
|
||||
|
||||
#define AM335X_GENERIC_CLOCK_DEV(i) \
|
||||
{ .id = (i), \
|
||||
@ -429,6 +438,13 @@ am335x_clk_details(clk_ident_t id)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static int
|
||||
am335x_clk_noop_activate(struct ti_clock_dev *clkdev)
|
||||
{
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
static int
|
||||
am335x_clk_generic_activate(struct ti_clock_dev *clkdev)
|
||||
{
|
||||
@ -475,6 +491,13 @@ am335x_clk_gpio_activate(struct ti_clock_dev *clkdev)
|
||||
return (0);
|
||||
}
|
||||
|
||||
static int
|
||||
am335x_clk_noop_deactivate(struct ti_clock_dev *clkdev)
|
||||
{
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
static int
|
||||
am335x_clk_generic_deactivate(struct ti_clock_dev *clkdev)
|
||||
{
|
||||
@ -497,6 +520,13 @@ am335x_clk_generic_deactivate(struct ti_clock_dev *clkdev)
|
||||
return (0);
|
||||
}
|
||||
|
||||
static int
|
||||
am335x_clk_noop_set_source(struct ti_clock_dev *clkdev, clk_src_t clksrc)
|
||||
{
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
static int
|
||||
am335x_clk_generic_set_source(struct ti_clock_dev *clkdev, clk_src_t clksrc)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user