Blame view

include/splash.h 2.07 KB
dd4425e85   Robert Winkler   video: lcd: Add C...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  /*
   * Copyright (C) 2013, Boundary Devices <info@boundarydevices.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., http://www.fsf.org/about/contact/
   */
  
  #ifndef _SPLASH_H_
  #define _SPLASH_H_
7bf71d1f5   Nikita Kiryanov   lcd: split splash...
24
  #include <errno.h>
dd4425e85   Robert Winkler   video: lcd: Add C...
25

f82eb2fa5   Nikita Kiryanov   common: convert c...
26
27
28
  enum splash_storage {
  	SPLASH_STORAGE_NAND,
  	SPLASH_STORAGE_SF,
870dd3095   Nikita Kiryanov   splash_source: ad...
29
  	SPLASH_STORAGE_MMC,
9bb4e9474   Nikita Kiryanov   splash_source: ad...
30
  	SPLASH_STORAGE_USB,
50c2d2e12   Nikita Kiryanov   splash_source: ad...
31
  	SPLASH_STORAGE_SATA,
870dd3095   Nikita Kiryanov   splash_source: ad...
32
33
34
  };
  
  enum splash_flags {
db1b79b88   tomas.melin@vaisala.com   splash: add suppo...
35
36
37
  	SPLASH_STORAGE_RAW, /* Stored in raw memory */
  	SPLASH_STORAGE_FS,  /* Stored within a file system */
  	SPLASH_STORAGE_FIT, /* Stored inside a FIT image */
f82eb2fa5   Nikita Kiryanov   common: convert c...
38
  };
dd4425e85   Robert Winkler   video: lcd: Add C...
39

f82eb2fa5   Nikita Kiryanov   common: convert c...
40
41
42
  struct splash_location {
  	char *name;
  	enum splash_storage storage;
870dd3095   Nikita Kiryanov   splash_source: ad...
43
  	enum splash_flags flags;
f82eb2fa5   Nikita Kiryanov   common: convert c...
44
  	u32 offset;	/* offset from start of storage */
870dd3095   Nikita Kiryanov   splash_source: ad...
45
  	char *devpart;  /* Use the load command dev:part conventions */
1cb075c6c   Eran Matityahu   splash_source: ad...
46
47
  	char *mtdpart;	/* MTD partition for ubi part */
  	char *ubivol;	/* UBI volume-name for ubifsmount */
f82eb2fa5   Nikita Kiryanov   common: convert c...
48
  };
b6de2cd7e   Alexey Brodkin   splash: Introduce...
49
  #ifdef CONFIG_SPLASH_SOURCE
f82eb2fa5   Nikita Kiryanov   common: convert c...
50
  int splash_source_load(struct splash_location *locations, uint size);
b6de2cd7e   Alexey Brodkin   splash: Introduce...
51
52
53
54
55
56
57
  #else
  static inline int splash_source_load(struct splash_location *locations,
  				     uint size)
  {
  	return 0;
  }
  #endif
dd4425e85   Robert Winkler   video: lcd: Add C...
58
  int splash_screen_prepare(void);
ff8fb56b6   Anatolij Gustschin   video: consolidat...
59
60
61
62
63
  #ifdef CONFIG_SPLASH_SCREEN_ALIGN
  void splash_get_pos(int *x, int *y);
  #else
  static inline void splash_get_pos(int *x, int *y) { }
  #endif
7bf71d1f5   Nikita Kiryanov   lcd: split splash...
64
65
66
67
68
69
70
71
  #if defined(CONFIG_SPLASH_SCREEN) && defined(CONFIG_LCD)
  int lcd_splash(ulong addr);
  #else
  static inline int lcd_splash(ulong addr)
  {
  	return -ENOSYS;
  }
  #endif
ff8fb56b6   Anatolij Gustschin   video: consolidat...
72
  #define BMP_ALIGN_CENTER	0x7FFF
dd4425e85   Robert Winkler   video: lcd: Add C...
73
74
  
  #endif