Ignore:
Timestamp:
2012-11-26T19:02:45Z (12 years ago)
Author:
Adam Hraska <adam.hraska+hos@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
04552324
Parents:
5d230a30 (diff), 7462674 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merged mainline,1723.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/drv/infrastructure/rootamdm37x/amdm37x.h

    r5d230a30 r69146b93  
    11/*
    2  * Copyright (c) 2006 Martin Decky
    3  * Copyright (c) 2011 Martin Sucha
     2 * Copyright (c) 2012 Jan Vesely
    43 * All rights reserved.
    54 *
     
    2827 */
    2928
    30 /** @addtogroup fs
     29/** @addtogroup amdm37xdrv
    3130 * @{
    32  */
     31 */
     32/** @file
     33 * @brief AM/DM 37x device.
     34 */
     35#ifndef AMDM37x_H
     36#define AMDM37x_H
    3337
    34 /**
    35  * @file        ext2.c
    36  * @brief       EXT2 file system driver for HelenOS.
    37  */
     38#include "uhh.h"
     39#include "usbtll.h"
    3840
    39 #include "ext2fs.h"
    40 #include <ipc/services.h>
    41 #include <ns.h>
    42 #include <async.h>
    43 #include <errno.h>
    44 #include <unistd.h>
    45 #include <task.h>
    46 #include <stdio.h>
    47 #include <libfs.h>
    48 #include "../../vfs/vfs.h"
     41#include "cm/core.h"
     42#include "cm/clock_control.h"
     43#include "cm/usbhost.h"
     44#include "cm/mpu.h"
     45#include "cm/iva2.h"
    4946
    50 #define NAME    "ext2fs"
     47#include "prm/clock_control.h"
     48#include "prm/global_reg.h"
    5149
    52 vfs_info_t ext2fs_vfs_info = {
    53         .name = NAME,
    54         .instance = 0,
    55 };
     50#include <bool.h>
    5651
    57 int main(int argc, char **argv)
    58 {
    59         printf(NAME ": HelenOS EXT2 file system server\n");
     52typedef struct {
     53        uhh_regs_t *uhh;
     54        tll_regs_t *tll;
     55        struct {
     56                mpu_cm_regs_t *mpu;
     57                iva2_cm_regs_t *iva2;
     58                core_cm_regs_t *core;
     59                clock_control_cm_regs_t *clocks;
     60                usbhost_cm_regs_t *usbhost;
     61        } cm;
     62        struct {
     63                clock_control_prm_regs_t *clocks;
     64                global_reg_prm_regs_t *global;
     65        } prm;
     66} amdm37x_t;
    6067
    61         if (argc == 3) {
    62                 if (!str_cmp(argv[1], "--instance"))
    63                         ext2fs_vfs_info.instance = strtol(argv[2], NULL, 10);
    64                 else {
    65                         printf(NAME " Unrecognized parameters");
    66                         return -1;
    67                 }
    68         }
    69        
    70         async_sess_t *vfs_sess = service_connect_blocking(EXCHANGE_SERIALIZE,
    71             SERVICE_VFS, 0, 0);
    72         if (!vfs_sess) {
    73                 printf(NAME ": failed to connect to VFS\n");
    74                 return -1;
    75         }
     68int amdm37x_init(amdm37x_t *device, bool trace_io);
     69int amdm37x_usb_tll_init(amdm37x_t *device);
     70void amdm37x_setup_dpll_on_autoidle(amdm37x_t *device);
     71void amdm37x_usb_clocks_set(amdm37x_t *device, bool enabled);
    7672
    77         int rc = ext2fs_global_init();
    78         if (rc != EOK) {
    79                 printf(NAME ": Failed global initialization\n");
    80                 return 1;
    81         }       
    82                
    83         rc = fs_register(vfs_sess, &ext2fs_vfs_info, &ext2fs_ops,
    84             &ext2fs_libfs_ops);
    85         if (rc != EOK) {
    86                 fprintf(stdout, NAME ": Failed to register fs (%d)\n", rc);
    87                 return 1;
    88         }
    89        
    90         printf(NAME ": Accepting connections\n");
    91         task_retval(0);
    92         async_manager();
    93         /* not reached */
    94         return 0;
    95 }
    96 
     73#endif
    9774/**
    9875 * @}
    99  */ 
     76 */
Note: See TracChangeset for help on using the changeset viewer.