[BACK]Return to machdep.c CVS log [TXT][DIR] Up to [local] / prex-old / dev / arm / cats

Annotation of prex-old/dev/arm/cats/machdep.c, Revision 1.3

1.1       nbrk        1: /*
1.3     ! nbrk        2:  * $Id: machdep.c,v 1.2 2008/07/23 21:00:07 nbrk Exp $
1.1       nbrk        3:  */
                      4: /*-
                      5:  * Copyright (c) 2007, Kohsuke Ohtani
                      6:  * All rights reserved.
                      7:  *
                      8:  * Redistribution and use in source and binary forms, with or without
                      9:  * modification, are permitted provided that the following conditions
                     10:  * are met:
                     11:  * 1. Redistributions of source code must retain the above copyright
                     12:  *    notice, this list of conditions and the following disclaimer.
                     13:  * 2. Redistributions in binary form must reproduce the above copyright
                     14:  *    notice, this list of conditions and the following disclaimer in the
                     15:  *    documentation and/or other materials provided with the distribution.
                     16:  * 3. Neither the name of the author nor the names of any co-contributors
                     17:  *    may be used to endorse or promote products derived from this software
                     18:  *    without specific prior written permission.
                     19:  *
                     20:  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
                     21:  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
                     22:  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
                     23:  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
                     24:  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
                     25:  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
                     26:  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                     27:  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
                     28:  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
                     29:  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
                     30:  * SUCH DAMAGE.
                     31:  */
                     32:
                     33: /*
                     34:  * machdep.c - machine dependent functions
                     35:  */
                     36:
                     37: #include <driver.h>
                     38:
1.2       nbrk       39: extern uint32_t        sapmc_getfreq(void);
                     40: extern void    sapmc_setfreq(int mode);
                     41:
                     42:
1.1       nbrk       43: /*
                     44:  * Set system to suspend power state.
                     45:  */
                     46: void
                     47: machine_suspend(void)
                     48: {
                     49: }
                     50:
                     51: /*
                     52:  * Power off system
                     53:  */
                     54: void
                     55: machine_poweroff(void)
                     56: {
                     57:
                     58:        irq_lock();
                     59:        printk("The system is halted. You can turn off power.");
                     60:        for (;;)
                     61:                machine_idle();
                     62: }
                     63:
                     64:
                     65: /*
                     66:  * Initialize
                     67:  */
                     68: int
                     69: machine_init(void)
                     70: {
1.3     ! nbrk       71:        /*
        !            72:         * Set Core frequency to maximum value.
        !            73:         */
        !            74:        printk("StrongARM Core Frequency %u MHz, ", sapmc_getfreq() / 1000000);
        !            75:        sapmc_setfreq(12);
        !            76:        printk("setting CCF to %u MHz\n", sapmc_getfreq() / 1000000);
1.1       nbrk       77:
                     78:        return 0;
                     79: }

CVSweb