From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: Carlo Caione <carlo.caione@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 1/5] BCM2835: clocksource driver
Date: Fri, 12 Oct 2012 11:26:53 +0200 [thread overview]
Message-ID: <20121012092653.GG13639@game.jcrosoft.org> (raw)
In-Reply-To: <1349992331-22987-2-git-send-email-carlo.caione@gmail.com>
On 23:52 Thu 11 Oct , Carlo Caione wrote:
> Signed-off-by: Carlo Caione <carlo.caione@gmail.com>
> ---
> drivers/clocksource/Kconfig | 4 ++
> drivers/clocksource/Makefile | 1 +
> drivers/clocksource/bcm2835.c | 92 +++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 97 insertions(+)
> create mode 100644 drivers/clocksource/bcm2835.c
>
> diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
> index 9d6d293..09acdd7 100644
> --- a/drivers/clocksource/Kconfig
> +++ b/drivers/clocksource/Kconfig
> @@ -2,6 +2,10 @@ config ARM_SMP_TWD
> bool
> depends on ARM && CPU_V7
>
> +config CLOCKSOURCE_BCM2835
> + bool
> + depends on ARCH_BCM2835
> +
> config CLOCKSOURCE_NOMADIK
> bool
> depends on ARM
> diff --git a/drivers/clocksource/Makefile b/drivers/clocksource/Makefile
> index bef465c..92d7c13 100644
> --- a/drivers/clocksource/Makefile
> +++ b/drivers/clocksource/Makefile
> @@ -1,2 +1,3 @@
> obj-$(CONFIG_ARM_SMP_TWD) += arm_smp_twd.o
> +obj-$(CONFIG_CLOCKSOURCE_BCM2835) += bcm2835.o
> obj-$(CONFIG_CLOCKSOURCE_NOMADIK) += nomadik.o
> diff --git a/drivers/clocksource/bcm2835.c b/drivers/clocksource/bcm2835.c
> new file mode 100644
> index 0000000..60085a9
> --- /dev/null
> +++ b/drivers/clocksource/bcm2835.c
> @@ -0,0 +1,92 @@
> +/*
> + * Author: Carlo Caione <carlo@carlocaione.org>
> + *
> + * Based on clocksource for nomadik
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License as
> + * published by the Free Software Foundation; either version 2 of
> + * the License, or (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
> + * MA 02111-1307 USA
> + *
> + */
> +
> +
> +#include <common.h>
> +#include <clock.h>
> +#include <io.h>
> +#include <init.h>
> +#include <driver.h>
> +#include <errno.h>
> +#include <linux/clk.h>
> +#include <linux/err.h>
> +
> +static __iomem void *stc_base;
> +
> +static uint64_t stc_read_cycles(void)
> +{
> + return readl(stc_base + 0x04);
will prefer a macor for the 0x04 with the reg name
but ok
Best Regards,
J.
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2012-10-12 9:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-11 21:52 [PATCH 0/5] BCM2835/RPi support Carlo Caione
2012-10-11 21:52 ` [PATCH 1/5] BCM2835: clocksource driver Carlo Caione
2012-10-12 9:26 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2012-10-11 21:52 ` [PATCH 2/5] BCM2835: add gpio driver Carlo Caione
2012-10-12 9:30 ` Jean-Christophe PLAGNIOL-VILLARD
2012-10-11 21:52 ` [PATCH 3/5] ARM1176: add support Carlo Caione
2012-10-11 21:52 ` [PATCH 4/5] BCM2835: " Carlo Caione
2012-10-12 9:33 ` Jean-Christophe PLAGNIOL-VILLARD
2012-10-11 21:52 ` [PATCH 5/5] Raspberry-Pi: " Carlo Caione
2012-10-12 9:35 ` Jean-Christophe PLAGNIOL-VILLARD
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121012092653.GG13639@game.jcrosoft.org \
--to=plagnioj@jcrosoft.com \
--cc=barebox@lists.infradead.org \
--cc=carlo.caione@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.