X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=board%2Fgen860t%2Fbeeper.c;h=0bebca98b1e61d176a503b289f1ffc7489e1761a;hb=7bcee5f7eef740c506117e6da1226bc8ec7f466a;hp=b4c2c89885ba39a13a5944ccee032562b8530fc5;hpb=42fd5f87b1613d3039f57e93c16f760a768d3e84;p=oweals%2Fu-boot.git diff --git a/board/gen860t/beeper.c b/board/gen860t/beeper.c index b4c2c89885..0bebca98b1 100644 --- a/board/gen860t/beeper.c +++ b/board/gen860t/beeper.c @@ -2,23 +2,7 @@ * (C) Copyright 2002 * Keith Outwater, keith_outwater@mvis.com * - * See file CREDITS for list of people who contributed to this - * project. - * - * 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 + * SPDX-License-Identifier: GPL-2.0+ */ #include @@ -36,14 +20,14 @@ /* * Initialize beeper-related hardware. Initialize timer 1 for use with - * the beeper. Use 66 Mhz internal clock with prescale of 33 to get + * the beeper. Use 66 MHz internal clock with prescale of 33 to get * 1 uS period per count. * FIXME: we should really compute the prescale based on the reported * core clock frequency. */ void init_beeper (void) { - volatile immap_t *immap = (immap_t *) CFG_IMMR; + volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR; immap->im_cpmtimer.cpmt_tgcr &= ~TGCR_RST1 | TGCR_STP1; immap->im_cpmtimer.cpmt_tmr1 = ((33 << TMR_PS_SHIFT) & TMR_PS_MSK) @@ -62,7 +46,7 @@ void set_beeper_frequency (uint frequency) { #define FREQ_LIMIT 2500 - volatile immap_t *immap = (immap_t *) CFG_IMMR; + volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR; /* * Compute timer ticks given desired frequency. The timer is set up @@ -79,7 +63,7 @@ void set_beeper_frequency (uint frequency) */ void beeper_on (void) { - volatile immap_t *immap = (immap_t *) CFG_IMMR; + volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR; immap->im_cpmtimer.cpmt_tgcr &= ~TGCR_STP1; } @@ -89,7 +73,7 @@ void beeper_on (void) */ void beeper_off (void) { - volatile immap_t *immap = (immap_t *) CFG_IMMR; + volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR; immap->im_cpmtimer.cpmt_tgcr |= TGCR_STP1; } @@ -104,7 +88,7 @@ void beeper_off (void) */ void set_beeper_volume (int steps) { - volatile immap_t *immap = (immap_t *) CFG_IMMR; + volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR; int i; if (steps >= 0) {