svn commit: r254593 - head/sys/arm/ti/am335x
Ian Lepore
ian at FreeBSD.org
Wed Aug 21 04:49:58 UTC 2013
Author: ian
Date: Wed Aug 21 04:49:58 2013
New Revision: 254593
URL: http://svnweb.freebsd.org/changeset/base/254593
Log:
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.
Modified:
head/sys/arm/ti/am335x/am335x_prcm.c
Modified: head/sys/arm/ti/am335x/am335x_prcm.c
==============================================================================
--- head/sys/arm/ti/am335x/am335x_prcm.c Wed Aug 21 04:20:17 2013 (r254592)
+++ head/sys/arm/ti/am335x/am335x_prcm.c Wed Aug 21 04:49:58 2013 (r254593)
@@ -137,9 +137,12 @@ static struct resource_spec am335x_prcm_
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(stru
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), \
@@ -430,6 +439,13 @@ am335x_clk_details(clk_ident_t id)
}
static int
+am335x_clk_noop_activate(struct ti_clock_dev *clkdev)
+{
+
+ return (0);
+}
+
+static int
am335x_clk_generic_activate(struct ti_clock_dev *clkdev)
{
struct am335x_prcm_softc *sc = am335x_prcm_sc;
@@ -476,6 +492,13 @@ am335x_clk_gpio_activate(struct ti_clock
}
static int
+am335x_clk_noop_deactivate(struct ti_clock_dev *clkdev)
+{
+
+ return(0);
+}
+
+static int
am335x_clk_generic_deactivate(struct ti_clock_dev *clkdev)
{
struct am335x_prcm_softc *sc = am335x_prcm_sc;
@@ -498,6 +521,13 @@ am335x_clk_generic_deactivate(struct ti_
}
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)
{
struct am335x_prcm_softc *sc = am335x_prcm_sc;
More information about the svn-src-all
mailing list