machdep.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /*
  2. * U-boot - machdep.h
  3. *
  4. * Copyright (c) 2005 blackfin.uclinux.org
  5. *
  6. * See file CREDITS for list of people who contributed to this
  7. * project.
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License as
  11. * published by the Free Software Foundation; either version 2 of
  12. * the License, or (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, write to the Free Software
  21. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  22. * MA 02111-1307 USA
  23. */
  24. #ifndef _BLACKFIN_MACHDEP_H
  25. #define _BLACKFIN_MACHDEP_H
  26. /* Machine dependent initial routines:
  27. *
  28. * Based on include/asm-m68knommu/machdep.h
  29. * For blackfin, just now we only have bfin, so they'd point to the default bfin
  30. *
  31. */
  32. struct pt_regs;
  33. struct kbd_repeat;
  34. struct mktime;
  35. struct hwclk_time;
  36. struct gendisk;
  37. struct buffer_head;
  38. extern
  39. void (*mach_sched_init) (void (*handler) (int, void *, struct pt_regs *));
  40. /* machine dependent keyboard functions */
  41. extern int (*mach_keyb_init) (void);
  42. extern int (*mach_kbdrate) (struct kbd_repeat *);
  43. extern void (*mach_kbd_leds) (unsigned int);
  44. /* machine dependent irq functions */
  45. extern void (*mach_init_IRQ) (void);
  46. extern void (*(*mach_default_handler)[]) (int, void *, struct pt_regs *);
  47. extern int (*mach_request_irq) (unsigned int irq,
  48. void (*handler) (int, void *,
  49. struct pt_regs *),
  50. unsigned long flags, const char *devname,
  51. void *dev_id);
  52. extern void (*mach_free_irq) (unsigned int irq, void *dev_id);
  53. extern void (*mach_get_model) (char *model);
  54. extern int (*mach_get_hardware_list) (char *buffer);
  55. extern int (*mach_get_irq_list) (char *buf);
  56. extern void (*mach_process_int) (int irq, struct pt_regs * fp);
  57. /* machine dependent timer functions */
  58. extern unsigned long (*mach_gettimeoffset) (void);
  59. extern void (*mach_gettod) (int *year, int *mon, int *day, int *hour,
  60. int *min, int *sec);
  61. extern int (*mach_hwclk) (int, struct hwclk_time *);
  62. extern int (*mach_set_clock_mmss) (unsigned long);
  63. extern void (*mach_reset) (void);
  64. extern void (*mach_halt) (void);
  65. extern void (*mach_power_off) (void);
  66. extern unsigned long (*mach_hd_init) (unsigned long, unsigned long);
  67. extern void (*mach_hd_setup) (char *, int *);
  68. extern long mach_max_dma_address;
  69. extern void (*mach_floppy_setup) (char *, int *);
  70. extern void (*mach_floppy_eject) (void);
  71. extern void (*mach_heartbeat) (int);
  72. extern void (*mach_l2_flush) (int);
  73. extern int mach_sysrq_key;
  74. extern int mach_sysrq_shift_state;
  75. extern int mach_sysrq_shift_mask;
  76. extern char *mach_sysrq_xlate;
  77. #ifdef CONFIG_UCLINUX
  78. extern void config_BSP(char *command, int len);
  79. extern void (*mach_tick) (void);
  80. #endif
  81. #endif