From patchwork Tue May 3 06:39:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 617807 X-Patchwork-Delegate: andreas.biessmann@googlemail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3qzWlK2T6dz9sDC for ; Tue, 3 May 2016 16:40:45 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b=VRufWkva; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 810F5A76F4; Tue, 3 May 2016 08:40:40 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rnshFy82VSK6; Tue, 3 May 2016 08:40:40 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 76495A768A; Tue, 3 May 2016 08:40:35 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B1197A74E3 for ; Tue, 3 May 2016 08:40:30 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TPEZSmfKtVaA for ; Tue, 3 May 2016 08:40:30 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-ig0-f169.google.com (mail-ig0-f169.google.com [209.85.213.169]) by theia.denx.de (Postfix) with ESMTPS id 49042A74C3 for ; Tue, 3 May 2016 08:40:26 +0200 (CEST) Received: by mail-ig0-f169.google.com with SMTP id m9so12070043ige.1 for ; Mon, 02 May 2016 23:40:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=vK9rN9nEsKJf3hD1+RKt2Wx7veOaQSKMj//dukzaTyA=; b=VRufWkvabetEYefz6L946ZdDtBN6urfGCsSO1FHiiNLh1/sQGncRtYHR4KpHR+63f1 qKYM+6CGGBUkEWf6uAXDB8w1K63NWHz6SFgIfz49KMs1890NaERLnzKkBOH9OPm5a/ZQ lNsF9g0zGH1+WQFASmlfzvR368BAFHgXoz1+iLGZl++EPjhDbcI9eJE5APeL4oy5xChT lYA5V7rvtzPTy6IeEZMBKzVQG7JUgHxEP6UvMYMuFH4F/HPoq7q4t4yGQ3tlKkRWPeC/ c+qbaTL9eh6sExMs6j5PQ4zYInXNVpIfxGDZIibl6cTM7d5Q4pXf6zPOunP5YeeOFiQ2 haLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=vK9rN9nEsKJf3hD1+RKt2Wx7veOaQSKMj//dukzaTyA=; b=kVXJgDbsDpd+2CN/NygGii/T4DKqHkwT4KGlBEcACVDVZ+QappJwU4aILiOFg4E3Yd KaYwSvsLRXFqHZzBeu4K1Fon5cQPgwelgxunLhy6rk26C0WIB7IHy882bUANu+9zomVD R9l2Lq045ngkGNXn9S0eT8GmvD+dDSkPLe7Qxy3zZqK1ndQeyB7TF401XXSVTjd9SQeD QJARCA+mE170bF/ha2JhMuh9ksrB0OAgEk6nucdkLmeNGWK0ZcfQABj8afaA0vo5LYGZ MlqyC88ZfFwBHHTWFNx2SzotITi9uLwbtKseU7DaeE6B75gur3ahuhImi9U2J4bgzpsx iyww== X-Gm-Message-State: AOPr4FW1K4Qp6yGLQTbnoifdvGQ/IHsEPXFHOi9OUt7tcDGvEMplcu/JdS+Y17cSDc+zMO+8 X-Received: by 10.50.27.99 with SMTP id s3mr25218287igg.88.1462257625184; Mon, 02 May 2016 23:40:25 -0700 (PDT) Received: from kaki.bld.corp.google.com ([2620:0:1005:12:d804:1d04:24d1:e693]) by smtp.gmail.com with ESMTPSA id fm1sm11878925igb.1.2016.05.02.23.40.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 May 2016 23:40:24 -0700 (PDT) Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id 0F9A7220C20; Tue, 3 May 2016 00:40:23 -0600 (MDT) From: Simon Glass To: U-Boot Mailing List Date: Tue, 3 May 2016 00:39:55 -0600 Message-Id: <1462257612-28746-2-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 2.8.0.rc3.226.g39d4020 In-Reply-To: <1462257612-28746-1-git-send-email-sjg@chromium.org> References: <1462257612-28746-1-git-send-email-sjg@chromium.org> Subject: [U-Boot] [PATCH 01/18] at91: Add support for the AT91 slow clock controller X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This is available on AT91SAM9G45. Add the peripheral address and flag definitions. Signed-off-by: Simon Glass Reviewed-by: Heiko Schocher Reviewed-by: Andreas Bießmann --- arch/arm/mach-at91/include/mach/at91_sck.h | 21 +++++++++++++++++++++ arch/arm/mach-at91/include/mach/at91sam9g45.h | 1 + 2 files changed, 22 insertions(+) create mode 100644 arch/arm/mach-at91/include/mach/at91_sck.h diff --git a/arch/arm/mach-at91/include/mach/at91_sck.h b/arch/arm/mach-at91/include/mach/at91_sck.h new file mode 100644 index 0000000..ce8e577 --- /dev/null +++ b/arch/arm/mach-at91/include/mach/at91_sck.h @@ -0,0 +1,21 @@ +/* + * Copyright (C) 2016 Google, Inc + * Written by Simon Glass + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef AT91_SCK_H +#define AT91_SCK_H + +/* + * SCKCR flags + */ +#define AT91SAM9G45_SCKCR_RCEN (1 << 0) /* RC Oscillator Enable */ +#define AT91SAM9G45_SCKCR_OSC32EN (1 << 1) /* 32kHz Oscillator Enable */ +#define AT91SAM9G45_SCKCR_OSC32BYP (1 << 2) /* 32kHz Oscillator Bypass */ +#define AT91SAM9G45_SCKCR_OSCSEL (1 << 3) /* Slow Clock Selector */ +#define AT91SAM9G45_SCKCR_OSCSEL_RC (0 << 3) +#define AT91SAM9G45_SCKCR_OSCSEL_32 (1 << 3) + +#endif diff --git a/arch/arm/mach-at91/include/mach/at91sam9g45.h b/arch/arm/mach-at91/include/mach/at91sam9g45.h index cf1c73f..5c32e24 100644 --- a/arch/arm/mach-at91/include/mach/at91sam9g45.h +++ b/arch/arm/mach-at91/include/mach/at91sam9g45.h @@ -109,6 +109,7 @@ #define ATMEL_BASE_RTT 0xfffffd20 #define ATMEL_BASE_PIT 0xfffffd30 #define ATMEL_BASE_WDT 0xfffffd40 +#define ATMEL_BASE_SCKCR 0xfffffd50 #define ATMEL_BASE_GPBR 0xfffffd60 #define ATMEL_BASE_RTC 0xfffffdb0 /* Reserved: 0xfffffdc0 - 0xffffffff */