Power: add an API to log wakeup reasons

Add API log_wakeup_reason() and expose it to userspace via sysfs path
/sys/kernel/wakeup_reasons/last_resume_reason

Change-Id: I81addaf420f1338255c5d0638b0d244a99d777d1
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>

(cherry picked from commit 1645b303c5e4ede5663607670741056dc0afbfd5)
POWER: fix compile warnings in log_wakeup_reason

Change I81addaf420f1338255c5d0638b0d244a99d777d1 introduced compile
warnings, fix these.

Change-Id: I05482a5335599ab96c0a088a7d175c8d4cf1cf69
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>

(cherry picked from commit 832cb2565effe797707ec000ff0dd134ef1f4a4f)
Power: Add guard condition for maximum wakeup reasons

Ensure the array for the wakeup reason IRQs does not overflow.

Change-Id: Iddc57a3aeb1888f39d4e7b004164611803a4d37c
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>

(cherry picked from commit df4b8c586aa4578a2755cb32d281a9cb103b4d15)
Power: Changes the permission to read only for sysfs file
/sys/kernel/wakeup_reasons/last_resume_reason

Change-Id: If25e8e416ee9726996518b58b6551a61dc1591e3
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>

(cherry picked from commit 4b13b4d3052f0fbfd222d6c7c19215e26f1d2931)
Makefile: define L1/L2 cache size

Patch by @JustArchi

Signed-off-by: arter97 <qkrwngud825@gmail.com>
(cherry picked from commit b1a6eac071b060cb86473df4c7a5e53a531857c8)

Conflicts:
	Makefile